注册 登录
编程论坛 JavaScript论坛

新手求助,这是我写的javascript代码,真心不太懂哪里错了

oreal 发布于 2013-12-03 22:44, 599 次点击
<html>
   
        <title></title>
<script type="text/javascript">        
function mOver(object)
{
    object.color="blue";
}
function mOver(object)
{
    object.color="blue";
}

function mOut(object)
{
    object.color="blue";
}
</script>   
<body>
<font style="cursor:hand"onclick="windows.location.href='http://www.'"onmouseover="mOver(this)"onmouseout="mOut(this)">欢迎访问</font>
</body>
</html>
这是我用dreamweaver写的代码,它老是提示我有错,新手不懂语法规则,麻烦指教
1 回复
#2
jzldf1802013-12-04 11:01
<font style="cursor:hand"onclick="windows.location.href='http://www.'"onmouseover="mOver(this)"onmouseout="mOut(this)">欢迎访问</font>

----改正后的语句-----
<font style="cursor:hand"onclick="window.location.href='http://www.'"onmouseover="mOver(this)"onmouseout="mOut(this)">欢迎访问</font>
1