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

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

问题描述

我有一个小问题,IE 8-9 不支持输入框的 placeholder 属性.

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天全站免登陆