<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. Redis本身是单线程线程安全的内存数据库,但是不代表你的使用就是线程安全的

    网上一个错误示例:https://www.cnblogs.com/Simeonwu/p/7881100.html,部分代码如下: package com.me.config; import redis ...

  2. EXCEL这样根据某单元格的内容来改变整行颜色

    1.选择你需要改变颜色的单元格列数,然后打开“格式”--“条件格式”: 2.选择“公式”一项,在后面输入=$L1=2050,然后点开下面的“格式”按钮设置好格式. 3.基本上就OK了,注意在输入公式的 ...

  3. yii2查询汇总

    页面输出list信息 return $this->render('index', [ 'model' => $model, 'cats' => $cats, 'findlist' = ...

  4. 转载 JavaScript的函数声明与函数表达式的区别

    1)函数声明(Function Declaration); // 函数声明 function funDeclaration(type){ return type==="Declaration ...

  5. P1006 传纸条-洛谷luogu-dp动态规划

    题目描述 小渊和小轩是好朋友也是同班同学,他们在一起总有谈不完的话题.一次素质拓展活动中,班上同学安排做成一个mm行nn列的矩阵,而小渊和小轩被安排在矩阵对角线的两端,因此,他们就无法直接交谈了.幸运 ...

  6. PAT A1134 Vertex Cover (25 分)——图遍历

    A vertex cover of a graph is a set of vertices such that each edge of the graph is incident to at le ...

  7. 初级算法-6.两个数组的交集 II

    题目描述: 给定两个数组,编写一个函数来计算它们的交集. 示例 : 输入: nums1 = [,,,], nums2 = [,] 输出: [,] 示例 : 输入: nums1 = [,,], nums ...

  8. 【Codeforces Round 725】Canada Cup 2016

    模拟Canada Cup 2016,ABC三题,Rank1376 第三题卡住了 Codeforces 725 C 求出两个相同字符的位置,记为x和y. 然后考虑把相同的那个字符放在第一行的什么地方, ...

  9. git 提交新增文件到网站

    git add -A 是将所有的修改都提交.你可以用git status查看当前的变化,然后通过git add xxx有选择的提交.git commit 是将变化先提交到本地.git commit - ...

  10. Luogu P2827 蚯蚓

    看到题目就可以想到直接开的堆模拟的过程了吧,这个还是很naive的 注意在用堆做的时候也是要明智一点的,对于蚯蚓长度的相加肯定不能直接遍历并加上,还是可以差分一下的 其实说白了就是把集体加->单 ...