head中创建function init(){};
body onload="init();"
可就是不走。我改了onload="alert('22');"的话是走的。。求解决
谢谢啊

解决方案 »

  1.   

    function init(){
    alert(9)
    }这样走吗?如果这样走,则说明是函数定义出错了
      

  2.   


    这样也不走,所以我感觉是函数引用写错了,就各种onload="init()"  onload="init;"
    还是不走。。
      

  3.   

    注意括号的大小写
    <script>
    function init(){
    alert("9")
    }
    </script>
    <body onload="init()">
      

  4.   


    没错的我现在怀疑是在手机上跳转到时候自动加载了个Window.onload。可是我不知道具体的FUN。我怎么测试下或者修改下试试。。