Live Brilliant

입력폼 클릭시 value 값 null로 변경 본문

개발은 핵찜이야/HTML/CSS

입력폼 클릭시 value 값 null로 변경

주인정 2012. 4. 13. 15:42

# 입력폼 value 값이 있을경우 입력폼 클릭시 value 값 빈값으로 변함

<form name='login_form' action='login.php'>
<input type='text' name='id' onFocus="this.className='id_focus'" onBlur="if ( this.value == '' ) { this.className='id_blur' }" class='id_blur' />
<br />
<input type='password' name='pw' onFocus="this.className='pw_focus'" onBlur="if ( this.value == '' ) { this.className='pw_blur' }" class='pw_blur' />
</form>

 

Comments