<html>
<body>
<input type="text" id="idNum" placeholder="placeholder" value="">
<script type="text/javascript">
var o = document.getElementById("idNum");
with(o){
alert(value);
alert(placeholder);
}
</script>
</body>
</html>

PlaceHolder IE9不支持,IE11支持。

HTML 5 placeHolder的更多相关文章

  1. HTML5轻松实现搜索框提示文字点击消失---及placeholder颜色的设置

    在做搜索框的时候无意间发现html5的input里有个placeholder属性能轻松实现提示文字点击消失功能,之前还傻傻的在用js来实现类似功能... 示例 <form action=&quo ...

  2. Placeholder如何换行

    使用js动态添加标签充,处理换行问题 var placeholder = 'This is a line \nthis should be a new line'; $('textarea').att ...

  3. 关于input标签和placeholder在IE8,9下的兼容问题

    一. input常用在表单的输入,包括text,password,H5后又新增了许多type属性值,如url, email, member等等,考虑到非现代浏览器的兼容性问题,这些新的type常用在移 ...

  4. 兼容IE8 input的placeholder的文字显示

    if( !('placeholder' in document.createElement('input')) ){ $('input[placeholder],textarea[placeholde ...

  5. input type="datetime-local" 时placeholder不显示

    一个坑,input的type="datetime-local" 时,电脑上会显示提示,如图 <input type="datetime-local" na ...

  6. input placeholder属性 样式修改(颜色,大小,位置)

    placeholder属性 样式修改 <!DOCTYPE html> <html> <head> <meta charset="utf-8" ...

  7. UITextField的placeholder文字的位置,颜色等的自定义设置

    //控制placeHolder的位置,左右缩20 -(CGRect)placeholderRectForBounds:(CGRect)bounds { CGRect inset = CGRectMak ...

  8. placeholder实现的两种方式

    /** * PlaceHolder组件 * $(input).placeholder({ * word: // @string 提示文本 * color: // @string 文本颜色 * evtT ...

  9. Placeholder在IE8的兼容问题

    <script type="text/javascript"> if( !('placeholder' in document.createElement('input ...

  10. 让IE8支持placeholder

    $(function(){ if(!placeholderSupport()){ // 判断浏览器是否支持 placeholder $('[placeholder]').focus(function( ...

随机推荐

  1. M100 组装教程

    http://bbs.dji.com/thread-37868-1-1.html

  2. SpringBoot实战(十四)之整合KafKa

    本人今天上午参考了不少博文,发现不少博文不是特别好,不是因为依赖冲突问题就是因为版本问题. 于是我结合相关的博文和案例,自己改写了下并参考了下,于是就有了这篇文章.希望能够给大家帮助,少走一些弯路. ...

  3. 单例模式和JDBC

    配置文件: driver=com.mysql.jdbc.Driver url=jdbc:mysql://localhost:3306/blog user=root user=1234 properti ...

  4. WebSockets通信

    WebSockets通信 1. websocket是什么?WebSocket是一种网络通信协议.2. 为什么需要websocket?我们有http协议,为什么还需要websocket协议呢?因为htt ...

  5. PAT A1098 Insertion or Heap Sort (25 分)——堆排序和插入排序,未完待续。。

    According to Wikipedia: Insertion sort iterates, consuming one input element each repetition, and gr ...

  6. 关于python3.x语法

    注1:该文章中所有的图示均使用的pycharm 注2:#号后面没有声明的均为运算结果 #用井字符开头的是单行注释 """ 多行字符串用三个引号 包裹,也常被用来做多 行注 ...

  7. 【Codeforces 1137C】Museums Tour

    Codeforces 1137 C 题意:给一个有向图,一周有\(d\)天,每一个点在每一周的某些时刻会开放,现在可以在这个图上从\(1\)号点开始随意地走,问最多能走到多少个开放的点.一个点如果重复 ...

  8. curl命令行

    curl命令行--强大的工具.通过各种参数,支持各种方式. 写几个常用的命令: 请求到的网站html curl http://www.baidu.com 比如想在命令行上请求一个接口,post过去几个 ...

  9. RabbmitMQ-工作队列及相关概念

    工作队列-WorkQueue 实现功能: 将耗时的任务分发给多个工作者 设计思想: 避免直接去做一件资源密集型的任务,并且还得等它完成.因此将任务安排后再去做.将任务封装为一个消息,发到队列中.一个工 ...

  10. [Oracle]如何取Control File 的Dump

    ]如何取Control File 的Dump: SQL> alter session set events 'immediate trace name controlf level 3';SQL ...