How do I put a link to a webpage in a JScript Alert dialog box?

前端 未结 7 1659
遥遥无期
遥遥无期 2021-01-13 22:28

I would like to put a link to a webpage in an alert dialog box so that I can give a more detailed description of how to fix the error that makes the dialog box get created.

7条回答
  •  花落未央
    2021-01-13 23:08

    alert("There was an error. Got to this page to fix it.\nwww.TheWebPageToFix.com");
    

    That's the best you can do from a JavaScript alert(). Your alternative option is to try and open a new tiny window that looks like a dialog. With IE you can open it modal.

提交回复
热议问题