textbox on focus and on blur
When the page loads the textbox is showing default开发者_StackOverflow社区 to State and when clicked on textbox it is showing empty like how it is supposed to work in this code. But when i do not enter anything into that textbox and move to next textbox i want it show State again. How can i do this?
<input type="textbox" id="state" border="0" value="State" class="form_textbox4" onFocus="if
(this.value==this.defaultValue) this.value=''; ">
onblur="if (this.value=='') this.value=this.defaultValue;"
Like so:
<input type="textbox" id="state" border="0" value="State" class="form_textbox4" onFocus="if
(this.value==this.defaultValue) this.value=''; " onBlur="if(this.value=='') this.value=this.defaultValue;">
精彩评论