使用onfocus实现输入框的placeholder
来源:互联网 发布:啥软件下种子 编辑:程序博客网 时间:2024/03/29 13:20
<!DOCTYPE html>
<html>
<head>
<metacharset="UTF-8">
<title></title>
</head>
<body>
<inputtype="text" id="txt1" value="用户名"/>
<inputtype="text" name="txt2" id="txt2"value="" placeholder="用户名"/>
<scripttype="text/javascript">
varoTxt = document.getElementById("txt1");
oTxt.onfocus= function(){
oTxt.value = "";
}
oTxt.onblur= function(){
oTxt.value = "用户名";
}
</script>
</body>
</html>
0 0
- 使用onfocus实现输入框的placeholder
- 网页输入框的提示实现 placeholder
- 输入框(onfocus/onblur)
- javascript的onfocus和onblur事件实现输入框的提示信息显隐
- PlaceHolder的两种实现方式(输入框提示)
- 修改输入框placeholder的样式
- 各种输入框的各种placeholder
- 修改输入框placeholder文字的样式
- 输入框placeholder字体
- 实现UITextView的placeholder及限制输入次数(干货)
- js实现输入框仿html5 placeholder功能
- onfocus="this.select();"的使用
- 让div支持placeholder属性/模拟输入框的placeholder属性
- 密码框显示placeholder提示信息 onfocus="this.type='password'"
- 带提示的input输入框类似html5的 placeholder
- 【jQuery】使得IE的输入框完成placeholder的使命
- 修改文本输入框默认的placeholder的字体颜色
- 修改文本输入框默认的placeholder的字体颜色
- servlet中load-on-startup的用法
- OC_FMDB有'深度'的DEMO
- 取消冒泡
- 选择最适合你的Linux学习方法
- javascript 常用技巧
- 使用onfocus实现输入框的placeholder
- jvm优雅关闭:
- 思讯823错误
- 人工智能常用 API
- Activity四种启动模式
- MPI Maelstrom poj 1502
- 事件绑定addEventListener
- 使用ThinkPHP框架开发中怎么有效保证多文件上传不重复呢
- logback.xml