<body onload="my_method()">

解决方案 »

  1.   

    可以
    <table align="center" cellpadding="0" cellspacing="0" border="0" width="300">
    </table>
    <script>
      my_method(); 
    </script>
      

  2.   

    先谢谢楼上的各位,我是说在加载的时候执行
    通过加入
     <script>
      my_method(); 
    </script>
    是可以随时调用函数
    但我是想知道可不可以把函数调用写在html 元素标签里
    因为一般的元素都没有onload这个触发事件。但是我又想达到这个效果
    是不是只能通过另写<script>....</script>的方式实现?
    谢谢了。
      

  3.   

    如果你允许使用其它事件,onReadyStateChange事件处理应该可以吧?