新しいウインドウにメッセージ(window.open)
<html> <head> <title>新しいウインドウにメッセージ</title> <script language="JavaScript"> <!-- //新しいウインドウにメッセージを表示 function msg() { win1 = window.open("","","width=200,height=100"); win1.document.write("<html><body bgcolor=\"#ccffcc\">"); win1.document.write("ようこそ!!<br><br><br>"); win1.document.write("<center><a href=\"javascript:self.close()\">このウインドウを閉じる</a></center>"); win1.document.write("</body></html>"); win1.document.close(); } //--> </script> </head> <body onLoad="msg()"> 新しいウインドウにメッセージ<br> </body> </html>
〔 実行する 〕