I got no exp or any knowledge in jquery but I want to put an alert on page load. I got this code Examples of using jQuery Alerts
<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>
How to set it on page load?
$(document).ready( function() {
jAlert('Example of a basic alert box in jquery', 'jquery basic alert box');
});
$(document).ready( function() {
jAlert('Example of a basic alert box in jquery', 'jquery basic alert box');
});
or You can use Window onload
window.onload=function(){
jAlert('Example of a basic alert box in jquery', 'jquery basic alert box');
};
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With