Search code examples
javascripthtmlmessagemessagebox

Javascript to Call a Html Page


So I been playing around... With POPUP Windows. It works fine but issue is the window box. What I need help with is a simple message that appears after my score board updates the score? For example: You Scored!!!! and is it possible to pass a html page instead of a message.


Solution

  • You access the document in your new window. With that, you can write HTML in your win variable like that:

    var win = window.open("", "Score", "width=200, height=100");
    win.document.write("<h1>Your score is xxx </h1>");