三个功能:
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;" onfocus="javascript:if(this.value == '请输入企业名称') this.value = ''; this.style.color='gray';" onblur="if(this.value == '') {this.value = '请输入企业名称'; this.style.color = 'gray';}">
最后
以上就是饱满啤酒最近收集整理的关于常用input文本框内容自动垂直居中并默认提示文字单击为空的全部内容,更多相关常用input文本框内容自动垂直居中并默认提示文字单击为空内容请搜索靠谱客的其他文章。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复