<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>
<body>
<a id="choose1" name="choose" style="cursor:hand;color:black;border-bottom:1px solid black;" onclick="choosePlay('choose1')">1</a>
<a id="choose2" name="choose" style="cursor:hand;color:black;border-bottom:1px solid black;" onclick="choosePlay('choose2')">2</a>
<script type="text/javascript">
function choosePlay(id){
var chooseSS=document.getElementsByName("choose");
for(var i=0;i<chooseSS.length;i++){
chooseSS[i].style.cssText="cursor:hand;color:black;border-bottom:1px solid black;";
}
var choose=document.getElementById(id);
choose.style.cssText="cursor:hand;color:blue;font-weight:bolder;";
}
</script>
</body>
</html>
javascript控制数字下划线样式(这只是一个例子)
最新推荐文章于 2022-11-22 13:56:38 发布