如果alert()之后再进行跳转本页,按以下方法你将等不到alert(),浏览器就本身刷新本页面了

<script type="text/javascript">
alert("你的资料已经录入!");
window.location.reload();
</script> 


想要弹出alert()后再跳转就用window.location.href="http://baidu.com"; ,改成下面方法 就OK了。

 alert("你的资料已经录入!");
 window.location.href = "http://baidu.com";

 

相关文章:

  • 2022-12-23
  • 2021-12-31
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-02-08
  • 2022-12-23
  • 2021-12-31
  • 2021-12-26
相关资源
相似解决方案