【发布时间】:2013-10-19 04:12:40
【问题描述】:
html:
<div class="div-input">
<input type="text" id="loginname" name="username" value="" maxlength="25"
class="form-input" placeholder="Username"
/>
</div>
<div class="div-input">
<input type="password" id="loginpassword" name="password" maxlength="25"
class="form-input" placeholder="Password"
/>
</div>
<div>
<input type="submit" name="login" value="LOGIN" class="form-button"
onclick="return check_login("/")"
/>
<span id="logInfo"></span><span style="display: none;" id="overlay"></span>
<span style="display: none;" id="popup">
<img src="/public/images/loading.gif" />
</span>
</div>
我的问题是占位符在所有浏览器中都可以正常工作,对于 IE8 和 IE9,我使用 Javascript 来解决它,但在 IE10 中占位符可以正常工作,但方式不正确。
在页面加载时会发生什么情况,如果
Placeholder是占位符,我在 IE10 中只得到Placeholde作为占位符(最后一个字母消失),但如果我在输入框和页面外单击它显示正确的占位符为Placeholder。如果我在输入字段中键入任何单词,我会在输入字段的角落看到一个十字符号(关闭符号),这仅在 IE10 中发生。
【问题讨论】:
-
第二点是 IE-10 删除文本框所有内容的特性
-
问题不在标记中。您可能有一些脚本会破坏 IE 10 中的占位符。您应该将其添加到问题中。
标签: javascript html css internet-explorer internet-explorer-8