javascript 事件

 

实现类似超链接的效果,this代表本页面元素

<html> 
<head> 

<script type="text/javascript"> 
function mOver(obj){ 
    obj.color="red"; 
} 
function mOut(obj){ 
    obj.color="blue"; 
}


</script> 

</head>

<body>

<font style="cursor:hand" 
onclick="window.location.href='http://www.baidu.com/'" 
onmouseover="mOver(this)" 
onmouseout="mOut(this)" >欢迎进入</font>

</body> 
</html>
原文地址:https://www.cnblogs.com/qq-757617012/p/4185355.html