3. Implementation/VB / Java Script

[JavaScript] Custom Window 띄우기

SSKK 2009. 7. 4. 13:22
 

<html>

<head>

<script type=text/javascript>

<!--

    function openWin(){

        win1 = window.open('','','width=100,height=100');

        win1.document.open();

        win1.document.write("<html><body>");

        win1.document.write("HELLO~<br>");

        win1.document.write("</body></html>");

        win1.document.close();

    }

//-->

</script>

</head>

<body>

<form>

<input type=button onClick="openWin();" value="열기">

</form>

</body>

</html>


document 내장 객체를 이용하여, open, write, close 순서로 한다.