将下面代码拷贝进一个html文件中就可以运行查看效果。

 

function downLoad(evt) {
               disabledButton();
              MyPeriodicalExecuter(evt);
     }
      function disabledButton(){
             var inputs = document.getElementsByTagName_r("input");
           for(var i = 0;i
                   if(inputs[i].type.toLowerCase()=="button")
                             inputs[i].disabled=true;
               }
      }
  
      function MyPeriodicalExecuter(evt){
            succ.obj=evt;
          succ.loop=0;
           sh=setInterval(succ,1000);
     }
  
      function succ(){
               var str="禁止连续点击,"
              with(arguments.callee){
                        obj.value=str+"("+(loop++)+"/15)秒后再试";
                 if (loop > 15){
                                enabledButton();
                               obj.value=" 下载 ";
                              clearInterval(sh);
                             return;
                        }   
               }
      }

      function enabledButton(){
              var inputs = document.getElementsByTagName_r("input");
           for(var i = 0;i
                   if(inputs[i].type.toLowerCase()=="button")
                             inputs[i].disabled=false;
              }
      }

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-06-15
  • 2022-12-23
  • 2022-12-23
  • 2021-07-29
  • 2021-11-14
  • 2022-12-23
猜你喜欢
  • 2021-11-17
  • 2021-06-30
  • 2021-11-17
  • 2021-08-06
  • 2021-12-25
相关资源
相似解决方案