$(function(){ $('#questionnaire').on('hidden.bs.modal',function(){ //清除缓存方法 }); }); 事件 Bootstrap 的模态框类提供了一些事件用于监听并执行你自己的代码. All modal events are fired at the modal itself (i.e. at the ). 事件类型 描述 show.bs.modal show 方法调用之后立即触发该事件.如果是通过点击某个作为触发器的元素,则此元素…
在进行元素定位时常常遇到这样的alert框: 那么该如何定位并点击确定或取消按钮呢?stackoverflow上找到了这个问题的答案. OK, Show you the code: driver.findElement(By.id("updateButton")).click(); //pop up with id "updateButton" opens Alert alert = driver.switchTo().alert(); //update is ex…
function alert_autoClose(title,msg,icon){ var interval; var time=1000; var x=2; //设置时间2s $.messager.alert(title,msg,icon,function(){}); interval=setInterval(fun,time); function fun(){ --x; if(x==0){ clearInterval(interval); $(".m…