jquery setTimeout()几秒钟后跳转网页
程序员文章站
2022-05-14 09:26:16
...
<script type="text/javascript">
$(document).ready(function () {
//$("#submitbtn").click(function(){
setTimeout(function(){//两秒后跳转
alert("恭喜你注册成功,两秒后跳转。");
//location.href = "index.php";//PC网页式跳转
$.mobile.changePage("index.php"); //手机网页式跳转
},2000);
// });
});
</script>