简体   繁体   中英

i would like to reload the index.html page after clicking “ok” with alertify

I have this line of javascript in my code

alertify.alert("<div class='alert'>Some speech</div>");

I would like to reload the index.html page after clicking "ok"

Is it possible without going on alertify.confirm?

Well, You can use this code to achieve what you want:

alertify.alert("This is an alert dialog.", function(){
    location.reload();
});

Below is the link to the demo: http://jsfiddle.net/5HygY/67/

I hope this helps.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM