可以参考下..
<!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=gb2312" />
<title>无标题文档</title>
</head>
<body>
<script type="text/javascript">
function $(id){
return document.getElementById(id);
}
function start(){
alert("开始!");
$("btnStart").value = "暂停";
$("btnStart").onclick = pause;
}
function pause(){
alert("暂停");
$("btnStart").value = "开始";
$("btnStart").onclick = start;
}
window.onload = function(){
$("btnStart").onclick = start;
};
</script><input type="button" id="btnStart" name="btnStart" value="开始" />
</body>
</html>

解决方案 »

  1.   

    函数名最好别用start IE6下可能会有问题.
      

  2.   

    给你一点参考...<input type='button' value='开始' onclick='do(this,0)' />
    <script language='javascript'>
      function do(obj,flag)
      {
        switch(flag)
        {
           case 0:
               alert(this.value)
               obj.onclick=function()
               {
                  do(this,1)
               }
               obj.value='暂停'
               break
           case 1:
               alert(this.value)
               obj.onclick=function()
               {
                  do(this,0)
               }
               obj.value='开始' 
               break
           default:        
        }
      }
    </script>
      

  3.   


    <html> 
    <head>
     <script>
          function mystart(){
    alert("start");
    var _button = document.getElementById('start');
    _button.value="other";
    _button.onclick = myother;
      }
      function myother(){
    alert("other");
      }
      </script>
    </head>
    <body> 
    <input type="button" id='start' value="start" onclick="mystart()">
    </body> 
    </html>lz参考一下
      

  4.   

    上面的alert(this.value)错了,是alert(obj.value)
      

  5.   


    <!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=gb2312" />
    <title>无标题文档</title>
    </head>
    <body>
    <script type="text/javascript">
    function $(id){
        return document.getElementById(id);
    }function bt1(){
    alert("开始")
    }
    function bt2(){
    alert("暂停")
    }
    function bt3(){
    alert("继续")
    }
    function bt4(){
    alert("停止")
    }
    var bt=[
    ["开始","bt1()"],
    ["暂停","bt2()"],
    ["继续","bt3()"],
    ["停止","bt4()"]
    ]
    var btN=0
    function DoIt(obj){
    btN++
    if (btN>=bt.length)
    //return;//终止
    btN=0;//循环
    obj.value=bt[btN][0]
    eval(bt[btN][1])
    }
    </script><input type="button" id="btnStart" name="btnStart" value="开始" onclick=DoIt(this) />
    </body>
    </html>