<body onload="button1.disabled=false">
<input id=button1 type=button value="按钮" disabled>

解决方案 »

  1.   

    <body onload="b1.disabled=false">
    <input type=button id=b1 disabled=true>
    </body>
      

  2.   

    这些button不在要加载的叶面中,我希望在页面加载时,用户不能点击这些按钮。
      

  3.   

    知道了,在iframe里面:
    <input id=button1 type=button value="按钮" disabled>然后在上层页面使用:
    if(iframeName.document.readyState=="complete")  //检查页面是否加载完毕
       iframeName.document.all.button1.disabled = falseiframeName 替换成对应 iframe 的 id
      

  4.   

    按钮不是iframe中的,是上层页面中的,还有就是要是页面没有加载完按钮不能使用,但是最后等页面加载完后,按钮还是可以使用的,也就是说一定把这句话执行一次iframeName.document.all.button1.disabled = false,请问你加的语句放在哪里比较好?难道是按钮的点击事件中?能不能实现iframeName.document.readyState=="complete" 不成立时处于等待状态,直到成立了才执行下面的语句?
      

  5.   

    <body onload="checkload()">
    <input id=button1 type=button value="按钮" disabled>
    <iframe id="iframe1" src="test.htm"></iframe><script>
    var chk
    function checkload(){
    if(iframe1.document.readyState=='complete'){
      button1.disabled=false;
      clearTimeout(chk)
    }
    else
    chk = setTimeout("checkload()",10)
    }
    </script>
      

  6.   

    还是有些问题,就是我执行checkload的时候,用户的点击信息已经来了,checkload还没有执行完,有没有方法使checkload成为一个不可中断的函数,也就是说让它成为一个原子操作?
      

  7.   

    用户的点击信息已经来了,checkload还没有执行完,使checkload成为不可中断?不太明白
      

  8.   

    就是说javascript中有没有同步函数?