占位符在IE9中 [英] Placeholder in IE9

查看:119
本文介绍了占位符在IE9中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

看起来这是一个非常有名的问题,但我在Google上找到的所有解决方案都不适用于我新下载的IE9。



这是您最喜欢的方式为了在输入 textarea 上启用占位符标签?



可选:我在这方面花了很多时间,并没有查找所需的属性。你是否也有这方面的建议?很明显,我可以检查PHP中的值,但为了帮助用户这个属性非常方便。 HTML5 Placeholder jQuery插件

- 由 Mathias Bynens HTML5 Boilerplate jsPerf



https://github.com/mathiasbynens/jquery-占位符



Demo&例子



http://mathiasbynens.be / demo / placeholder



ps

我曾多次使用过这个插件, 。当您提交表单时, 不会提交占位符文本作为值(...我用其他插件发现真正的痛苦)。


It seems it's a very well known problem but all the solutions I found on Google don't work on my newly downloaded IE9.

Which is your favorite way in order to enable the Placeholder property on the input and textarea tags?

Optional: I lost a lot of time on that and didn't look for the required property yet. Would you also have some advice for this? Obviously I can check the value in PHP, but to help the user this property is very convenient.

解决方案

HTML5 Placeholder jQuery Plugin
- by Mathias Bynens (a collaborator on HTML5 Boilerplate and jsPerf)

https://github.com/mathiasbynens/jquery-placeholder

Demo & Examples

http://mathiasbynens.be/demo/placeholder

p.s
I have used this plugin many times and it works a treat. Also it doesn't submit the placeholder text as a value when you submit your form (... a real pain I found with other plugins).

这篇关于占位符在IE9中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆