<input name="test" type="text" value="아이디" onFocus="if(this.value=='아이디')this.value='';" onBlur="if(this.value=='')this.value='아이디';">
<input name="city_state_zip" type="text" value="비밀번호" onFocus="if(this.value=='비밀번호')this.value='';" onBlur="if(this.value=='')this.value='비밀번호';">
‘아이디’ 박스에 글씨를 쓰기위해 마우스로 클릭하면 글씨 사라짐
‘비밀번호’를 클릭하면 ‘아이디’박스에 없어졌던 글씨가 다시 보임
'프로그래밍 > WEB,CSS,HTML5' 카테고리의 다른 글
div와 span태크 (0) | 2013.03.01 |
---|---|
CSS DIV 이미지 보이기 감추기 (0) | 2013.03.01 |
구글맵 fitBounds (0) | 2013.03.01 |
유용한 div 레이아웃 템플릿 사이트 (0) | 2013.02.27 |
How to add paypal to my website (0) | 2013.02.26 |