javascript - Can jAlert lead to any link? -
i newbie @ web developing. i've found online:
in part of html head:
<script type="text/javascript"> $(document).ready( function() { $("#alert_button").click( function() { jalert('text', 'title'); }); }); </script> and in part html body:
<input id="alert_button" type="button" value="submit"/> i after clicking "ok" in alert box, refreshes site. can done? if not, there simple way done?
thanks on answers!
you can call location.reload() in onclose callback, http://www.w3schools.com/jsref/met_loc_reload.asp
http://flwebsites.biz/jalert/#callbacks
<script type="text/javascript"> $(document).ready( function() { $("#alert_button").click( function() { $.fn.jalert({ 'title': 'onclose callback', 'message': 'check javascript console!', 'onclose': function(){ window.location.reload(); } }); }); }); </script>
Comments
Post a Comment