How to display placeholder text on focus?

I have the following placeholder: <div class="input-text-container search" style="display:none;"> <input type="text" id="textSearch" class="input-text-big search-message" placeholder="Search in your list"/> <i class="common-sprite cross search"></i> </div> The input is displayed when the user clicks on an icon with the class "search.icon-search"

如何在焦点上显示占位符文本?

我有以下占位符: <div class="input-text-container search" style="display:none;"> <input type="text" id="textSearch" class="input-text-big search-message" placeholder="Search in your list"/> <i class="common-sprite cross search"></i> </div> 当用户点击一个类别为“search.icon-search”的图标时,会显示该输入。 我使用以下JS代码: $('.search.icon-search').on(

Internet Explorer 10 and 11 remove placeholder text when the input is focused

When using Internet Explorer 10 and 11, input placeholder text is removed if the input is focused using the autofocus attribute. For example: <input type="textbox" value="" placeholder="Example text" autofocus> Demo: https://jsfiddle.net/ompkwtz5/ How can I ensure the placeholder text isn't removed? Ref: https://connect.microsoft.com/IE/feedback/details/885747/ie-11-fires-the-inp

重点关注输入时,Internet Explorer 10和11将删除占位符文本

当使用Internet Explorer 10和11时,如果使用autofocus属性聚焦输入,则会删除输入占位符文本。 例如: <input type="textbox" value="" placeholder="Example text" autofocus> 演示: https : //jsfiddle.net/ompkwtz5/ 我怎样才能确保占位符文本不被删除? Ref:https://connect.microsoft.com/IE/feedback/details/885747/ie-11-fires-the-input-event-when-a-input-field-with-placeholder-is-focused 这是

Clearing the textbox values onclick and displaying onblur

有没有办法清除文本框上的默认文本框值onclick并在窗体页面上显示多个文本框的onblur? function Clear1(str) { document.getElementById(str).value= ""; } function Clear2(str2) { var aa1=document.getElementById(str2); if (aa1.value==""){ document.getElementById(str2).style.backgroundColor = "#ffcccc"; }else{ document.getElementById(str2).style.backgroundColor = "#ff

清除文本框的值onclick并显示onblur

有没有办法清除文本框上的默认文本框值onclick并在窗体页面上显示多个文本框的onblur? function Clear1(str) { document.getElementById(str).value= ""; } function Clear2(str2) { var aa1=document.getElementById(str2); if (aa1.value==""){ document.getElementById(str2).style.backgroundColor = "#ffcccc"; }else{ document.getElementById(str2).style.backgroundColor = "#ff

HTML: HTML5 Placeholder attribute in password field issue

I am making a Login form, in which there are two fields- simplified: <input type="text"> <input type="password" placeholder="1234567" > In my tests (FF, Chrome) the placeholer shows grey text. How can I have the placeholder text in password 'dots' ? And have placeholder support in IE? eg. the user sees a fake grey password, not the text 1233467. (I have jquery avail

HTML:密码字段问题中的HTML5占位符属性

我正在制作一个登录表单,其中有两个字段 - 简化: <input type="text"> <input type="password" placeholder="1234567" > 在我的测试中(FF,Chrome),placeholer显示灰色文本。 我怎样才能在密码“点”的占位符文本? 在IE中有占位符支持? 例如。 用户看到一个伪造的灰色密码,而不是文本1233467。 (我有jquery可用) 非常感谢你, 哈雷 编辑:看起来像这是使用占位符的错误方式。 但是,如何

The best placeholder polyfil script for ie7, ie8 and ie9

Which placeholder polyfill script do you recommend that I use to provide placeholder support in ie7, 8 & 9. I've seen the following list from the modernizer team and was wondering if anybody here had some mileage with them or any others not on the list and what they think is the best My criteria for evaluation would be: File Size Ability to work without modernizer/yepnope Speed

ie7,ie8和ie9的最佳占位符polyfil脚本

您建议使用哪种占位符polyfill脚本来在ie7,8和9中提供占位符支持。 我已经看到了来自现代化团队的以下列表,并且想知道这里的任何人是否与他们或其他任何人不在列表中,并且他们认为是最好的 我的评估标准是: 文件大小 没有modernizer / yepnope的工作能力 速度(没有疯狂循环) 稳定性,它在野外使用多少? 检测原生占位符的能力,而不是打扰跑步 我记得有一天,我曾经在占位符支持的输入事件onclick事件中写

set placeholder for internet explorer?

This question already has an answer here: Input placeholders for Internet Explorer 17 answers IE9 and earlier don't support the placeholder attribute. It's in IE10+. There are a number of JavaScript solutions out there, if you look for "placeholder shim" or similar. For instance, I did the place5 jQuery plug-in, but that won't help you if you don't use jQuery. B

为Internet Explorer设置占位符?

这个问题在这里已经有了答案: Internet Explorer 17的输入占位符的答案 IE9和更早版本不支持placeholder属性。 它在IE10 +中。 如果您寻找“占位符垫片”或类似的东西,那里有很多JavaScript解决方案。 例如,我做了place5 jQuery插件,但如果你不使用jQuery,那不会对你有所帮助。 但是,还有其他几个。 这个问题和答案列出了几个。 您也可以在IE浏览器中显示占位符。 使用这个插件,这可能是最简单的方法。 适用

Input Text focus like Facebook Input

This question already has an answer here: Input placeholders for Internet Explorer 17 answers 这是你要求的吗? input[type=text] { color:#ccc; border:thin solid #999; } input[type=text]:focus { background:#999; } i have found the solution for cross browser :) here is the link http://jethrolarson.github.io/placeholder-augment/

输入文字焦点,如Facebook输入

这个问题在这里已经有了答案: Internet Explorer 17的输入占位符的答案 这是你要求的吗? input[type=text] { color:#ccc; border:thin solid #999; } input[type=text]:focus { background:#999; } 我发现跨浏览器的解决方案:)这里是链接 http://jethrolarson.github.io/placeholder-augment/

Textarea placeholder not disappearing on focus/typing in IE10

net mvc web application in which I have multiple textarea and input fields. Now the placeholder is working great in all browsers (chrome, firefox) but in Internet Explorer 10 , the placeholder text doesn't disappear on focus or on typing in the text area. <textarea placeholder="Write Query..." maxlength="1000"></textarea> A colleague of mine told me that this is due to a bug in

Textarea占位符不会在焦点/ IE10中输入时消失

净mvc网络应用程序,其中我有多个textarea和input字段。 现在占位符在所有浏览器(chrome,firefox)中运行良好,但在Internet Explorer 10 ,占位符文本在焦点上或在文本区域中输入时不会消失。 <textarea placeholder="Write Query..." maxlength="1000"></textarea> 我的一位同事告诉我,这是由于jquery版本<1.8.3的错误? 这是真的? 有没有解决方法? 我只是将一些页面添加到现有的应用程序,所以我不

Input's placeholder text disapper on focus and not on typing

I am building a PhoneGap application for Android phones with AngularJS and I have noticed that when I use an old Samsung Galaxy S2 my input's placeholder text disappear on focus but when I use new Samsung Galaxy S4 my input's placeholder text keep on showing until key pressed. How can i set it so it work the same in all Android phones?

输入的占位符文本消除焦点,而不是输入

我正在用AngularJS构建Android手机的PhoneGap应用程序,我注意到当我使用旧的三星Galaxy S2时,我的输入的占位符文本在焦点上消失,但是当我使用新的三星Galaxy S4时,我的输入的占位符文本一直显示,直到按下按键。 我如何设置它,使其在所有Android手机中都能保持一致?

How to remove bottom line from Input text

I'm working on an angular2 project with Materialize I've done a custom style for the txt input but I can't get ride of the bottom line when the user select the input See the red line : Here is the style : @import "variables"; /* * Style for InputText, override material-design for a more boxed design. */ .style-input input:not([type=submit]):not([type=fi

如何从输入文本中删除底线

我正在使用Materialize处理angular2项目 我为txt输入做了一个自定义样式,但当用户选择输入时,我无法获得底线 看到红线: 这是风格: @import "variables"; /* * Style for InputText, override material-design for a more boxed design. */ .style-input input:not([type=submit]):not([type=file]) { box-sizing: border-box; -webkit-box-sizing: border-box; -moz-box-s