<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. swift语言混编--语言交互的接口

    FFI stands for Foreign Function Interface. A foreign function interface is the popular name for the ...

  2. 【美妙的Python之三】Python 对象解析

    美妙的Python之Python对象         简而言之: Python 是能你无限惊喜的语言.与众不同.         Python对象概念的理解,是理解Python数据存储的前提.Pyth ...

  3. python下载脚本

    #/usr/bin/env python#coding:UTF-8import timeimport os,sysimport urllib2 url = 'http://downloaduat.la ...

  4. P2347 砝码称重 (01背包)

    题目描述 设有 1g1g1g . 2g2g2g . 3g3g3g . 5g5g5g . 10g10g10g . 20g20g20g 的砝码各若干枚(其总重 ≤1000 \le 1000≤1000 ), ...

  5. jvm内存模型中-栈,方法区,程序计数器是线程安全的

    文章转自  https://www.cnblogs.com/myna/p/7567889.html 引文 JDK7及之前版本的方法区(Method Area)和Java堆一样,是各个线程共享的内存区域 ...

  6. spring-batch批处理框架

    转自 http://www.cnblogs.com/gulvzhe/archive/2011/10/21/2220260.html 这个框架没有实际操作,只是从同事处学习到,先转个好文章,以后有机会再 ...

  7. https://leetcode.com/problems/palindromic-substrings/description/

    https://www.cnblogs.com/grandyang/p/7404777.html 博客中写的<=2,实际上<=1也是可以的 相当于判断一个大指针内所有子字符串是否可能为回文 ...

  8. python关联eureka实现高并发

    弥补网上python关联微服务空白,结合多个pythonweb框架实践,找到一个可行的方案python加入到eureka,实现java和python的完美结合 # coding:utf- import ...

  9. java 二维数组和对象数组

    1.二维数组:二维数组就是存储一维数组(内存地址/引用)的数组 2.二维数组的初始化 1) int intA[][]={{1,2},{2,3},{3,4,5}}; 2) int [][] intB=n ...

  10. 记住left join最简单的方式(转)

    表aaid adate1    a12    a23    a3表bbid bdate1    b12    b24    b4 select * from a left join b on a.ai ...