本文介绍了jQuery和浏览器兼容性的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 29岁程序员,3月因学历无情被辞! Yikes!我一直是开发人员多年,一直努力强调与尽可能多的系统兼容的代码。Yikes! I've been a developer for many years and have always tried to emphasize code that is compatible with as many systems as possible.最近,我购买了这本书 jQuery in Action 并开始阅读它。我非常不安的是,包括的源代码似乎在我目前的计算机上的任何一个浏览器上都不能正常工作。Recent, I purchased the book jQuery in Action and started reading it. I am very disturbed by the fact that the included source code doesn't appear to work correctly on either of the browsers on my current computer.具体来说,我下载了图书的源代码,并为第2章选择了jQuery Selectors Lab。但它不是看起来如何Specifically, I downloaded the book's source code and selected the "jQuery Selectors Lab" for Chapter 2. But it doesn't look how it does in the book.在Google Chrome上,DOM样本和DOM样本代码窗格都完全为空。在IE7上,事情似乎更接近他们在书中的出现。但是DOM示例代码窗格中的源代码全部在一行(向右延伸,离开页面)。请注意,本书中的屏幕截图是在Mac上运行的浏览器。On Google Chrome, both the DOM Sample and DOM Sample Code panes are completely empty. On IE7, things appear much closer to how they appear in the book. But the source code in the DOM Sample Code pane is all on one line (which extends to the right, off the page). Note that the screenshots in the book are of a browser running on the Mac.我很好奇使用jQuery的用户更多的跨浏览器兼容性用户发现,I'm curious what sort of cross-browser compatibility users more experienced with jQuery are finding, and what this revelation means for developers who like to be as compatible as possible and are planning to use jQuery.推荐答案 jQuery是主动的支持所有这些浏览器:jQuery is actively supported in all these browsers: Firefox 2.0 + Internet Explorer 6 + Safari 3 + Opera 10.6 + Chrome 8+Firefox 2.0+Internet Explorer 6+Safari 3+Opera 10.6+Chrome 8+根据以下列表,过时的浏览器存在已知问题:There are known problems with outdated browsers as per the list below: Mozilla Firefox 1.0。 x Internet Explorer 1.0-5.x Safari 1.0-2.0.1 Opera 1.0- 9.x KonquerorMozilla Firefox 1.0.xInternet Explorer 1.0-5.xSafari 1.0-2.0.1Opera 1.0-9.xKonqueror jQuery通常适用于Konqueror和Firefox 1.0.x,可能有一些意想不到的错误,因为我们不测试他们定期。jQuery generally works with Konqueror and Firefox 1.0.x, but there may be some unexpected bugs since we do not test them as regularly.如果您使用任何过时的浏览器,那么这可能是您的问题,否则,您应该在stackoverflow上发布您的代码以获得帮助。它可能不是导致问题的浏览器,但它可能是代码写入或执行的方式。If you are using any of the outdated browsers, then this could be your problem, otherwise, you should post your code here on stackoverflow to get help. It may not be the browser causing the problem, but it could be the way code is written or executed. 这篇关于jQuery和浏览器兼容性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云! 09-03 19:24