Notice
Recent Posts
Recent Comments
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
Tags
- rss
- flex3
- 스킨 스쿠버
- 도커
- ejb
- php thumbnail
- 책이야기
- 나의 프로젝트
- express for node.js
- Cross
- Eclipse
- node.js web framework
- ror실행
- 베트남어
- 나의 취미
- 메일왕창보내는법
- 디즈니씨
- php
- 명사 뽑아내기
- 주식이야기
- docker
- 명사 분석기
- iBatis
- ajax
- C/C++
- nodejs express
- scala
- 명사 추출기
- Lift
- Node.js
Archives
- Today
- Total
nkdk의 세상
JS :: 업로드 이미지 미리보기 양식 본문
- onfocus : 포커스가 위치할 시 이벤트가 수행됩니다.
- onblur : 포커스가 해제되면 이벤트가 수행됩니다.
<html>
<script language="JavaScript">
<!--function in_photo() {
var frm = document.frm1;
if (frm.photo1.value)
document.img1.src = frm.photo1.value; // 업로드양식의 이미지경로를 할당
}
// -->
</script>
<body>
<center><form method="post" name="frm1">
<table border=1 cellpadding=1 cellspacing=0>
<tr>
<td align="center" bgcolor="#d5d3d5">[이미지]</td>
<td>
<input type="file" name="photo1" size=25
onfocus="this.style.backgroundColor='#f0f0e0'; in_photo()"
onblur="this.style.backgroundColor='#e0e0e0'">
</td>
</tr><tr>
<td colspan=2 align="center"><br>
<font size=2>- 미리보기를 할 수 있습니다. -</font><br><br>
<img src="" name="img1" align="absmiddle">
</td>
</tr>
</table>
</form></center>
</body>
</html>