87,901
社区成员
发帖
与我相关
我的任务
分享
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
</head>
<body>
<a id="test">aaa</a>
<script type="text/javascript">
var a=document.getElementById("test");
a.onFocus=function (){
alert("");
}
</script>
</body>
</html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
</head>
<body>
<a id="test" href="javascript:;">aaa</a>
<script type="text/javascript">
var a=document.getElementById("test");
a.onfocus=function (){
alert("focus");
}
</script>
</body>
</html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
</head>
<body>
<a id="test" href="javascript:;">aaa</a>
<script type="text/javascript">
var a=document.getElementById("test");
a.onfocus=function (){
alert("focus");
}
</script>
</body>
</html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
</head>
<body>
<a href="#" id="test">aaa</a>
<input id='ss' type="text" />
<script type="text/javascript">
window.onload = function(){
var a=document.getElementById("test");
var sss=document.getElementById("ss");
a.onfocus=function (){
alert("");
}
sss.onfocus=function (){
alert("");
}
}
</script>
</body>
</html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
</head>
<body>
<a id="test">aaa</a>
<input id='ss' type="text" />
<script type="text/javascript">
window.onload = function(){
var a=document.getElementById("test");
var sss=document.getElementById("ss");
a.onfocus=function (){
alert("");
}
sss.onfocus=function (){
alert("");
}
}
</script>
</body>
</html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
</head>
<body>
<a id="test">aaa</a>
<input id='ss' type="text" />
<script type="text/javascript">
window.onload = function(){
var a=document.getElementById("test");
var sss=document.getElementById("ss");
a.onfocus=function (){
alert("");
}
sss.onfocus=function (){
alert("");
}
}
</script>
</body>
</html>