如何在IE8和9中支持占位符属性 [英] How to support placeholder attribute in IE8 and 9

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

问题描述

我有一个小问题,输入框的占位符属性在IE 8-9中不支持。

I have a small issue, the placeholder attribute for input boxes is not supported in IE 8-9.

在我的项目(ASP Net)中提供这种支持的最佳方式是什么?我正在使用jQuery。
需要我使用其他外部工具吗?

What is the best way to make this support in my project (ASP Net). I am using jQuery. Need I use some other external tools for it?

http://www.hagenburger.net/BLOG/HTML5-Input-Placeholder-Fix-With-jQuery.html 一个很好的解决方案?

Is http://www.hagenburger.net/BLOG/HTML5-Input-Placeholder-Fix-With-jQuery.html a good solution?

推荐答案

您可以使用这个jQuery插件:
https://github.com/mathiasbynens/jquery-placeholder

You could use this jQuery plugin: https://github.com/mathiasbynens/jquery-placeholder

但是你的链接似乎也是一个很好的解决方案。

But your link seems to be also a good solution.

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

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