Notice
Recent Posts
Recent Comments
Link
| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 1 | 2 | 3 | 4 | 5 | 6 | |
| 7 | 8 | 9 | 10 | 11 | 12 | 13 |
| 14 | 15 | 16 | 17 | 18 | 19 | 20 |
| 21 | 22 | 23 | 24 | 25 | 26 | 27 |
| 28 | 29 | 30 | 31 |
Tags
- Maven
- 자바스크립트
- Bootstrap
- MSsql
- jsp
- SpringSource Tool Suite
- TextBox
- 자바
- 이클립스
- STS
- WebView
- scrollView
- Redirect
- Web Service
- MS-SQL
- javascript
- MANTIS
- Apache Lucene
- 웹뷰
- varags
- asp.net
- 안드로이드
- Java
- Eclipse
- Android
- decompiler
- html
- C#
- 웹 서비스
- 컬럼명
Archives
- Today
- Total
bboks.net™
페이지 로드 후 자바스크립스 실행 본문
웹 페이지를 작성하다보면 페이지를 완전히 읽은 후 자바스크립트를 실행해햐 하는 경우가 생긴다. 이때는 페이지의 body 태그에 onload 태그를 이용해 해결할 수 있다.
<head>
<script language="javascript" type="text/javascript">
<!-- 실행할 자바스크립스 메소드-->
function printWindow() {
window.print();
}
</script>
</head>
<body onload="printWindow()">
.......
</body>
<script language="javascript" type="text/javascript">
<!-- 실행할 자바스크립스 메소드-->
function printWindow() {
window.print();
}
</script>
</head>
<body onload="printWindow()">
.......
</body>