61,115
社区成员
发帖
与我相关
我的任务
分享
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
<title>无标题 1</title>
<script type="text/javascript">
function BackgroundColor()//点击字体颜色变化
{
var q = 4; for (i = 1; i < 4; i++)
{ if (document.getElementById("hr" + i) != null) { document.getElementById("hr" + i).style.color = ''; } }
}
</script>
</head>
<body>
<div style="margin:0 auto" align="center"><input type="text"/><input type="text"/></div>
<div style="margin-left:auto;margin-right:auto" align="center"><input type="text"/><input type="text"/></div>
<div style="width:140px;line-height:25px;">
<a id="hf1" href="#" onclick="BackgroundColor();this.style['color']='red'" >参数1 </a>
</div>
<div style="width:140px;line-height:25px;">
<a id="hf2" href="#" onclick="BackgroundColor();this.style['color']='#333333'" >参数2 </a>
</div>
<div style="width:140px;line-height:25px;">
<a id="hf3" href="#" onclick="BackgroundColor();this.style['color']='#333333'" >参数3 </a>
</div>
<div style="width:140px;line-height:25px;">
<a id="hf4" href="#" onclick="BackgroundColor();this.style['color']='#333333'" >参数4 </a>
</div>
</body>
</html>