相关疑难解决方法(0)

占位符不在IE8中显示Bootstrap

我正在为我的项目使用Bootstrap.除Internet Explorer 8及更低版本外,占位符对所有浏览器都显示正常.

是否有任何解决方案可以在IE8中获得占位符支持?

jquery placeholder internet-explorer-8 twitter-bootstrap

15
推荐指数
2
解决办法
3万
查看次数

IE9 RTW是否支持输入元素的占位符属性?

一堆网站在IE9中提到支持,但我认为这是出现在Betas或RC中的东西.它似乎在IE9最终版本中不受支持.有人能证实吗?

html5 input placeholder rtw internet-explorer-9

8
推荐指数
1
解决办法
9406
查看次数

IE9 HTML5占位符 - 人们如何实现这一目标?

我正在尝试placeholder="xxx"在我的Web应用程序中使用该属性,我不想为IE9提供特殊的视觉效果.人们可以在IE9中为实现此功能提出一些好的建议吗?

我在这里找到了几个链接,但没有一个建议的脚本足够......答案是从2011年中期开始的,所以我想也许有更好的解决方案.也许有广泛采用的jQuery插件?我不想使用任何需要侵入式代码的东西,例如需要某个css类或其他东西.

谢谢.

编辑 - 我还需要这个用于密码输入字段.

// the below snippet should work, but isn't.
$(document).ready(function() {
   initPlaceholders()();
}

function initPlaceholders() {
        $.support.placeholder = false;
var test = document.createElement('input');
if ('placeholder' in test) {
    $.support.placeholder = true;
    return function() { }
} else {
    return function() {
        $(function() {
            var active = document.activeElement;
            $('form').delegate(':text, :password', 'focus', function() {
                var _placeholder = $(this).attr('placeholder'),
                    _val = $(this).val();
                if (_placeholder != '' && _val == _placeholder) {
                    $(this).val('').removeClass('hasPlaceholder');
                }
            }).delegate(':text, :password', 'blur', …
Run Code Online (Sandbox Code Playgroud)

html5 placeholder internet-explorer-9

6
推荐指数
2
解决办法
3万
查看次数

占位符不在IE9中工作

可能重复:
ie9中的占位符

我正在为我的文本框使用占位符.问题是在firefox和chrome中它们出现了,但在IE9中它不起作用.我在互联网上搜索,但没有一个解决方案适合我.有任何想法吗?

<input class="text" type="text" name="name" value="" placeholder="Name" required /><br />
Run Code Online (Sandbox Code Playgroud)

html javascript jquery

5
推荐指数
2
解决办法
1万
查看次数

占位符未在IE9中显示

placeholder没有出现在IE9浏览器...
提供下面我的代码...做ü需要编写任何IE9的jQuery或CSS破解

http://defie.co/contact.html

<div class="span6">
    <i class="bookmarkingContact"></i>
    <h3 style="margin-bottom: 22px;">Inquiry</h3>

    <input class="span2" type="text" name="email" placeholder="User Name">
    <input class="span2" type="text" name="email" placeholder="Company">
    <input class="span2" type="text" name="email" placeholder="Email">
    <input class="span2" type="text" name="email" placeholder="Password">
    <a href="#" style="position: relative; top: 13px;">Sign Up</a>
</div>
Run Code Online (Sandbox Code Playgroud)

html javascript css jquery css3

1
推荐指数
1
解决办法
3187
查看次数