Blogger Information
Blog 43
fans 2
comment 2
visits 113232
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
关于定时器的一些操作
朝游东海
Original
866 people have browsed it

一:几秒后运行

layer.msg(data.msg,{icon:6,time:1000});
        setTimeout(function () {
         //location.href = location.href;
         //$('#RefreshButton').click();
          var index = parent.layer.getFrameIndex(window.name);
               layer.close(index);
               parent.location.reload(); // 父页面刷新
          }, 1000)


二:访问同一方法

function submit(){
  let data = {'status':0,'msg':'测试定时器1'};
  if(data.status == 0){
       layer.msg(data.msg,{icon: 5,time:1000});
       //setTimeout("submit()", 5000);  //两种方法都行
       //window.setTimeout(submit, 5000);
       return false;
   }
}


Statement of this Website
The copyright of this blog article belongs to the blogger. Please specify the address when reprinting! If there is any infringement or violation of the law, please contact admin@php.cn Report processing!
All comments Speak rationally on civilized internet, please comply with News Comment Service Agreement
0 comments
Author's latest blog post