<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta name="author" content="智能社 - zhinengshe.com">
<meta name="copyright" content="智能社 - zhinengshe.com">
<title>智能社 - www.zhinengshe.com</title>
<style>
* { margin:; padding:; }
.box {position:relative; width:200px; margin:50px auto;}
.box span { position:absolute; top:; left:5px; height:40px; line-height:40px; color:#; }
#inp1,#pass{ position:absolute; top:; left:; border:1px solid #; /* border:none 0;这个是兼容的写法 */
outline:none;width:190px; height:40px; line-height:40px; padding: 5px; background:none;}
#pass{top:55px;}
input::-ms-clear { display:none; } /* 去掉IE10输入框后的叉号 */
input::-ms-reveal{ display:none;} /* 去掉输入密码时的眼睛 */
</style>
<script>
window.onload=function (){
var oInp=document.getElementById('inp1');
var oSpan=document.getElementById('span1'); oInp.onfocus=function (){
oSpan.style.display='none';
};
oInp.onblur=function (){//失去焦点判断输入为空时 if (oInp.value.length == )
{
oSpan.style.display='block';
}
};
oSpan.onclick=function (){//点击提示文字时情况
oInp.focus();
};
};
</script>
</head> <body>
<div class="box">
<input type="text" id="inp1" />
<span id="span1">我是提示文字</span>
<input type="password" id="pass"/>
</div> </body>
</html>

最新文章

  1. visio二次开发——图纸解析之形状
  2. zencart安装后修改configure.php权限
  3. ios 适应屏幕
  4. HTML5+CSS3学习目录
  5. Android(java)学习笔记64:线程的控制
  6. 【MINA】OrderedThreadPoolExecutor和UnorderedThreadPoolExecutor的事件监听线程池的选择
  7. C# 判断某程序是否运行
  8. wpf异常:指定的 Visual 不是此 Visual 的上级问题处理解析
  9. bootstrap-datetimepicker使用记录
  10. https://repo1.maven.org/maven2/com/github/,开源软件清单list
  11. windows azure 实例
  12. hdu 4710 Balls Rearrangement (数学思维)
  13. 软工实践项目需求分析(团队)修改版get√-黄紫仪
  14. C语言扫盲及深化学习
  15. open还是codecs.open区别
  16. centos7下源码编译方式安装httpd
  17. [VS工具]远程在IIS附加调试代码
  18. 解决DoubanFM第三方客户端UI线程与工作线程交互问题
  19. [LeetCode系列]有序链表转换为平衡BST的递归解法
  20. 基于Node.js的ghost开源博客平台

热门文章

  1. windows的gvim总是报错: +iconv fencview.vim
  2. Elasticsearch--&gt;Get Started--&gt;Exploring Your Cluster
  3. 【打分策略】Elasticsearch打分策略详解与explain手把手计算
  4. [oracle复习] - Oracle
  5. Ubuntu下Eclipse安装与编译ns-3遇见的各种问题
  6. FOJ-1001-Duplicate Pair
  7. 深蓝色 --ppt
  8. MVC ---- Lambda表达式
  9. 百度编辑器 Ueditor 上传图片时打开文件夹的延迟问题,点击上传图片弹窗打开慢问题
  10. linux 系统调用号表