【求助】js中的鼠标事件的onmouseover和onmouseout怎么用? 那位大哥能写个小例子给我看看么非常感谢 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 <div> <a onmouseover="mouseOver(this)" onmouseout="mouseOut(this)">鼠标放在上面就知道了</a> </div> <script type="text/javascript"> function mouseOver(o) { o.style.backgroundColor = "red"; } function mouseOut(o) { o.style.backgroundColor = "blue"; } </script> <!DOCTYPE HTML><html> <head> <meta charset="gb2312" /> <title></title> </head> <body> <div id="test" style="border:1px solid red;">移动上来</div> <script> function $(el){ return typeof el == 'string' ? document.getElementById(el) : el; } $('test').onmouseover=function(){ this.style.border = '2px solid blue'; } $('test').onmouseout = function(){ this.style.border = '2px solid red'; } </script> </body></html> type="image/x-icon"什么意思啊, 用jQuery实现:鼠标滑过 单元格所在行和列都变色 输入一个单词给出其所有字母的排列 javascript问题:如何实现像QQ好友分类一样的滑动菜单效果? Asp.Net中JS问题!急!!!!!!!! 如何在一个页面显示N个计时器? Extjs4.2 在IE浏览器下,如何通过JAVASCRIPT知道指定元素内容区域宽度的像素值? 'JScript.encode' 怎么解? 请推荐一个反编译java程序的软件,并给出应用的实例。谢谢! 实现一个下拉框输入内容进行模糊查询的功能 哪位朋友能帮我 把帖子内容 解密一下 谢谢了
<a onmouseover="mouseOver(this)" onmouseout="mouseOut(this)">鼠标放在上面就知道了</a>
</div> <script type="text/javascript">
function mouseOver(o) {
o.style.backgroundColor = "red";
}
function mouseOut(o) {
o.style.backgroundColor = "blue";
}
</script>
<!DOCTYPE HTML>
<html>
<head>
<meta charset="gb2312" />
<title></title>
</head>
<body>
<div id="test" style="border:1px solid red;">移动上来</div>
<script>
function $(el){
return typeof el == 'string' ? document.getElementById(el) : el;
}
$('test').onmouseover=function(){
this.style.border = '2px solid blue';
}
$('test').onmouseout = function(){
this.style.border = '2px solid red';
}
</script>
</body>
</html>