a.html
======
<html>
<head>
<script>
window.onload=function(){
b.onclick=function(){
var n=window.open("b.html","nw","width=100px height=100px");
}
}
</script>
</head>
<body>
<input type="button" id="b">
</body>
</html>
b.html
======
<html>
<head>
<script>
window.onload=function(){
}
</script>
</head>
<body>
새창이다
</body>
</html>
'개발하자 > 자바스크립트' 카테고리의 다른 글
주소선택해서 이전창으로 불러오기 (0) | 2015.02.26 |
---|---|
text value값을 id로 이용하기 eval,getElementById (0) | 2015.02.26 |
onfocus,onblur (0) | 2015.02.26 |
과제3(마우스클릭 좌표값을 이용해 div출력하기) (0) | 2015.02.24 |
과제2(선택한 링크의 내용 텍스트박스에 출력하기) (0) | 2015.02.24 |