Insert title here
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<script>
function idFocus(){
if(document.getElementById('id').value == '아이디')
document.getElementById('id').value = '';
}
function idBlur(){
if(document.getElementById('id').value == '')
document.getElementById('id').value = '아이디';
}
function pwFocus(){
if(document.getElementById('password').value == '비밀번호') {
var original = document.getElementById('password');
var copy = original.cloneNode(false);
copy.type = 'password';
copy.value = '';
original.parentNode.replaceChild(copy, original);
copy.focus();
copy.select();
}
}
function pwBlur(){
if(document.getElementById('password').value == '') {
var original = document.getElementById('password');
var copy = original.cloneNode(false);
copy.type = 'text';
copy.value = '비밀번호';
original.parentNode.replaceChild(copy, original);
}
}
</script>
</head>
<body>
<table>
<tr>
<td>
<form method=post>
<input type=text value="아이디" name=id id=id onfocus=idFocus() onblur=idBlur()>
<input type=text value="비밀번호" name=password id=password onfocus=pwFocus() onblur=pwBlur()>
<input type=submit value="로그인">
</form>
</td>
</tr>
</table>
</body>
</html>