<! DOCTYPE HTML> <HTML> <head> <Meta charset = "UTF-. 8"> <title> tryCatchConfirm </ title> <Script> function Message () { the try { adddlert ( "available for purchase Guest!"); } The catch (ERR) { the let TXT = ""; TXT = "there is an error page \ n \ n."; TXT + = "click OK to continue jump \ n"; TXT = + "or click cancel to return \ n \ n-"; IF (Confirm (TXT)) { // the OK operation. Document.location.href = // "http://www.runoob.com/"; the Document. </script> </head> <body> <input type="button" value="查看消息" onclick="message()"/> </body> </html>
js tryCatchConfirm.html
Guess you like
Origin blog.csdn.net/weixin_42193179/article/details/90904828
Recommended
Ranking