87,910
社区成员
发帖
与我相关
我的任务
分享
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title> New Document </title>
<meta name="Generator" content="EditPlus">
<meta name="Author" content="">
<meta name="Keywords" content="">
<meta name="Description" content="">
</head>
<script type="text/javascript">
window.onload=function(){
document.getElementById('imgObject').onmouseover=function(){
this.style.border="1px solid red";
this.style.width="150px";
this.onmouseout=function(){
this.style.border="0px";
this.style.width="100px";
};
}
}
</script>
<body>
<img src="http://avatar.profile.csdn.net/3/3/3/2_zhuhuquan29.jpg" width="100" alt="" id="imgObject"/>
</body>
</html>
<script type="text/javascript">
window.onload=function(){
document.getElementById('imgObject').onmouseover=function(){
alert('你把鼠标移动到图片对象了');
}
}
</script>
<img src="http://avatar.profile.csdn.net/3/3/3/2_zhuhuquan29.jpg" alt="" id="imgObject"/>
document.getElementById('imgObject').onmouseover=function(){
alert('你把鼠标移动到图片对象了');
}