预先填充的表单字段在Internet Explorer中不起作用

时间:2012-10-22 16:01:09

标签: forms internet-explorer

我在我正在处理的网站上有一个PHP表单。我使用以下内容确保表单预先填充了描述: -

id="contactName" input name="name" class="input" type="text" placeholder="Enter your name here"

我使用了Placeholder =“预先填充”,这在Chrome,Firefox和Safari中运行良好,但是在Internet Explorer中没有出现任何想法,让文字显示在IE中?

欢呼声

马特

1 个答案:

答案 0 :(得分:1)

IE9或更低版本不支持

占位符。理论上将在IE10中得到支持。看到: http://caniuse.com/#search=placeholder

您可以在Google上搜索其他一些解决方案。我找到了一个声称可以在CSSNewbie.com上工作但我在IE浏览器中运行测试脚本时没有看到它...也许我错过了一些东西。 http://www.cssnewbie.com/cross-browser-support-for-html5-placeholder-text-in-forms/

我还发现了一个有一些Javascript来填补支持的要点: https://gist.github.com/1105055

相关问题