Jquery在怪癖模式下能否正常工作? [英] Does Jquery work well in quirks mode?

查看:140
本文介绍了Jquery在怪癖模式下能否正常工作?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

由于我无法控制的原因,该网站以怪癖模式工作.在这种情况下,jQuery会帮助我吗?

For reasons beyond my control, the site works in quirks mode. Will Jquery help me in this situation?

我希望jquery开发人员今天专注于严格模式-未来的模式.另一方面,所有这些库都曾经减轻了在怪癖模式下工作的痛苦.

I expect the jquery developers concentrate on strict mode today - the mode of the future. On the other hand, all those libraries once started to ease the pain of working in quirks mode.

推荐答案

否!

根据官方jQuery网站v.1.8. 1 :

不要使用Quirks模式! jQuery从未支持Quirks模式,我们 不要在Quirks中执行任何测试.这会影响像 $("window").height(),并且jQuery 1.8 Quirks模式的结果确实 更改以支持某些现代浏览器功能.大多数 我们看到的一些问题案例来自希望参与其中的开发人员 标准模式,但之前具有无效的文档类型或无关的标记 他们的标签.如有疑问,请使用简单且简短的<!doctype html>.

Don’t use Quirks mode! jQuery has never supported Quirks mode and we do not perform any testing in Quirks. This can affect values like $("window").height(), and the jQuery 1.8 Quirks mode results did change in order to support some modern browser features. The majority of problem cases we’ve seen are from developers that wanted to be in Standards mode but had an invalid doctype or extraneous markup before their tag. When in doubt, use the simple and short <!doctype html>.

这篇关于Jquery在怪癖模式下能否正常工作?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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