<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>
<body bgcolor="white" style="margin:0px;">
<button onclick="select.call(this);" style="position:relative;border:solid 2px white;">button</button>
<button onclick="select.call(this);" style="position:relative;border:solid 2px white;">button</button>
<button onclick="select.call(this);" style="position:relative;border:solid 2px white;">button</button>
<button onclick="select.call(this);" style="position:relative;border:solid 2px white;">button</button>
<iframe frameborder="0" style="z-Index:-1;position:relative;top:-2px;static;width:100%;height:500px;border:solid 2px orange;" name="main"></iframe>
</body>
<script>
function select()
{
var buttons=document.getElementsByTagName("button");
for(var i=0;i<buttons.length;i++){
buttons[i].style.borderColor='white';
buttons[i].style.borderBottomColor='orange';
buttons[i].style.zIndex=-2;
}
this.style.borderColor='orange';
this.style.borderBottomColor='white';
this.style.zIndex=2;
this.blur();
}
var buttons=document.getElementsByTagName("button");
select.call(buttons[0]);
</script>
</html>
posted on 2007-08-22 09:00
汪杰 阅读(250)
评论(0) 编辑 收藏 引用 所属分类:
js+dhtml