作者热门文章
- android - RelativeLayout 背景可绘制重叠内容
- android - 如何链接 cpufeatures lib 以获取 native android 库?
- java - OnItemClickListener 不起作用,但 OnLongItemClickListener 在自定义 ListView 中起作用
- java - Android 文件转字符串
我在页面上有四个按钮,当我点击其中一个按钮时,我希望它突出显示。
按钮用于将数据传递给 Controller 。他们是这样的:
<button name="region" id="region" type="button" onclick="window.location='/project/Viewdata/index/region/1'" class="current">ALL</button>
<button name="region" id="region2" type="button" onclick="window.location='/project/Viewdata/index/region/2'" class="current">1st</button>
最佳答案
检查这个JSFiddle
基本上,当您像这样单击按钮时,您可以使用 jQuery 将高光效果绑定(bind)到该按钮
$('button').click(function() {
$(this).effect( "highlight", {color: 'red'}, 3000 );
});
注意:如评论中所述,您永远不应在一页上有 2 个具有相同 ID 的元素。如果要使用相同的描述符,请使用 class
而不是 id
关于javascript - 当我点击它时如何突出显示html页面中的按钮?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17747112/
有没有一种方法可以“标记”对象的属性,使它们在反射中“突出”? 例如: class A { int aa, b; string s1, s2; public int AA
我是一名优秀的程序员,十分优秀!