Well inside a web page it's trivial, window is the global object so you can just write the following in a script block:
var bContinue = confirm("Do you wish to continue?"); //OR window.confirm(...
alert(bContinue); //OR window.alert(....
var oIE = new ActiveXObject("InternetExplorer.Application");
while (oIE.readyState != 4)
oIE.visible = true;
var oWin = oIE.document.parentWindow;
var bContinue = oWin.confirm("Do you wish to continue?");
WScript.echo("Continue: " + bContinue);