0
点赞
收藏
分享

微信扫一扫

常用文本框内容自动垂直居中,并且默认提示文字可单击为空(实例)!


三个功能:

1、内容自动垂直居中

2、默认提示文字显示灰色

3、单击后变为空

<input type="text" name="wd1" id="qy_1" maxlength="100" style="color:gray;width:199px;height:30px;line-height:30px;" autocomplete="off"  value="请输入企业名称" style="color:gray;" οnfοcus="javascript:if(this.value == '请输入企业名称') this.value = ''; this.style.color='gray';" οnblur="if(this.value == '') {this.value = '请输入企业名称'; this.style.color = 'gray';}">




举报

相关推荐

0 条评论