javascript implements a hyperlink like effect

  • 2020-05-09 18:07:06
  • OfStack

Achieve a hyperlink-like effect, with this representing this page element


<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)" > Welcome to </font>
</body>
</html>

If you have any idea about the javascript incident, please leave me a message if you have any questions


Related articles: