<script type=
"text/javascript"
>
$(
"a"
).click(
function
() {
clearClass();
$(
this
).addClass(
"bg_color"
);
});
function
clearClass() {
$(
"a"
).each(
function
() {
$(
this
).removeClass(
"bg_color"
);
});
}
</script>
<style type=
"text/css"
>
.bg_color
{
cursor
:
pointer
;//鼠标显示效果,小手
color
:Red;
font-weight:bold;//加粗
}
</style>
本文转自 潜心笃志 51CTO博客,原文链接:http://blog.51cto.com/82711020/1974157