重新加载页面后显示警告框? [英] Showing an alert box after the page is reloaded?

查看:91
本文介绍了重新加载页面后显示警告框?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在不使用

 body onload =myFunction()

重新加载页面后显示警告框?

解决方案

jQuery:

 <   script     type   =  text / javascript >  


(文件).ready(function(){
alert(Loaded);
});
< / script >



JavaScript

 <   script     type   =  text / javascript >  
窗口。 onload = function(){
alert(Loaded);
}
< / script >


How can I make an alert box to show after a page is reloaded without using the

body onload="myFunction()"

?

解决方案

jQuery :

<script type="text/javascript">


(document).ready(function(){ alert("Loaded"); }); </script>


JavaScript

<script type="text/javascript">
    window.onload = function(){
        alert("Loaded");
    }
</script>


这篇关于重新加载页面后显示警告框?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆