如题。

解决方案 »

  1.   

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>无标题文档</title>
    </head><body>
    <label>
    <input type="button" name="button" id="button" value="按钮"  onclick="alert('111')"/>
    </label>
    </body>
    </html>
      

  2.   

    3楼的兄弟。如果:<input type="button" name="button" id="button" value="按钮"  onclick="ShowNext()"/>是不行的。
      

  3.   

    <html>
    <head>
    <script>
    function ShowNext()
    {
    alert("Test!!!");
    }
    </script>
    </head>
    <body>
    <input type="button" name="button" id="button" value="button"  onclick="ShowNext()"/> 
    </body>
    </html>
    这样应该可以啊,ff中试了一下
      

  4.   

    <script >
    function init()
    {
    var button1=document.getElementById("button1");
    if(button1)
    {
     button1.onclick=ShowNext;
    button1.onclick();
    }
    }
    function ShowNext()
    {
    alert("Test!!!");

    <script/>
    <body onload='init()'
    <input type="button" name="button1" id="button" value="按钮"  >