-
- <input name="textfield" type="text" maxlength="20" value="请输入文字.."
- οnfοcus="if (value =='请输入文字..'){value =''}"
- οnblur="if (value ==''){value='请输入文字..'}" />
- <br><br>
- textarea:
- <textarea cols="50" rows="5" id="textarea" οnfοcus="if(value=='限100字'){value=''}"
- οnblur="if (value ==''){value='限100字'}">限100字</textarea>
转载于:https://www.cnblogs.com/seasonzone/p/4981410.html