我没有 exp 或任何 jquery 知识,但我想在页面加载时发出警报。 我得到这个代码 使用 jQuery 警报的示例
<script src="jquery.alerts.js" type="text/javascript"></script>
<link href="jquery.alerts.css" rel="stylesheet" type="text/css" media="screen" />
<!-- Example script -->
<script type="text/javascript">
$(document).ready( function() {
$("#basic_button").click( function() {
jAlert('Example of a basic alert box in jquery', 'jquery basic alert box');
});
});
</script>
</head>
<body>
<p>
<input id="basic_button" type="button" value="Show Basic Alert" />
</p>
</body>
</html>
如何在页面加载时设置它?
最佳答案
$(document).ready( function() {
jAlert('Example of a basic alert box in jquery', 'jquery basic alert box');
});
关于jquery - 在页面加载时启动 jQuery Alert,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22980351/