您的位置:首页 > Web前端 > JavaScript

javascript(js)中使用this

2013-12-09 11:00 435 查看
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>无标题文档</title>
</head>

<body>

<script type="text/javascript">
function test(oo) {
oo.getElementsByTagName("a")[0].style.display='block';
//alert(oo.innerHTML);
//alert(oo.getElementsByTagName("a")[0].style.display=='none');
}
</script>
</head>
<body>
<li onMouseMove="test(this);" style="border:1px solid #ff0000; width:300px; ">aa<a href="#" style="display:none; ">xxx</a></li>
<li>aa<a href="#">xxx</a></li>
<li>aa<a href="#">xxx</a></li>
<li>aa<a href="#">xxx</a></li>
<li>aa<a href="#">xxx</a></li>
</body>
</html>
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: