html5 support,GitHub - amiel/html5support: Support certain HTML 5 attributes with javascript, but on...

HTML5Support是一个旨在为不支持HTML5特性的浏览器提供轻量级支持的插件。它目前支持placeholder属性和autofocus属性。使用jQuery调用该插件,可以为旧版浏览器添加这些功能。此外,插件还提供了CSS样式以在不支持原生placeholder的浏览器中显示灰色占位符文本。未来计划扩展支持更多HTML5特性。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

HTML5 Support

The aim of HTML5 is to seamlessly provide support an extremely lightweight plugin for a few commonly used html5 attributes for browsers that don't already support them.

HTML5 Support currently supports the placeholder attribute and the autofocus attribute. HTML5 Also supports type=“password” fields, by special casing them, and swapping elements.

Example

HTML

jQuery

$(document).ready(function() {

$.html5support();

// or you can also run only support for what you want

$.placeholder();

// - or -

$.autofocus();

});

CSS

Use this CSS if you would like your placeholder text to show up grey in browsers that do not natively support placeholder.

.placeholder{ color: #888; }

TODO

Support could be added for more HTML5 features. Ideas:

License

HTML5 Support is licensed under the MIT License. See the MIT-License.txt file for full details.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值