移动设备 Javascript/CSS 支持。 外面有什么?
我即将开始一个 ASP.NET 应用程序,该应用程序将针对 iPhone、Blackberry 和 Windows Mobile 浏览器。 除了 iPhone 之外,我还没有找到太多关于这些平台支持哪些技术的信息。
由于我习惯于桌面浏览器开发,因此我喜欢使用 jQuery 和高级 CSS 功能等。 看来我无法在移动平台上使用这些东西了。
我想知道是否有人知道优秀的开发人员资源,我可以在其中找到适用于移动浏览器的资源(例如 quirksmode.org对于移动设备)。
据我所知,jQuery 不适用于移动浏览器(iPhone 除外)。 有谁知道有任何尝试以某种形式将 jQuery 移植到移动浏览器吗? 我说 jQuery 是因为我现有的网站使用的是它,我想保持一致性,但如果有其他框架提供的产品,我也有兴趣检查它们。
更新
我想更新此内容,以便让任何人知道谁可能会偶然发现这个问题。 网站 quirksmode.org 的运营者最近开始创建移动设备兼容性表。 您可以在这里查看它们:
I'm about to begin an ASP.NET application that will be targeted towards iPhones, Blackberries, and Windows Mobile browsers. Aside from the iPhone, I haven't been able to find much information on what technologies these platforms support.
Since I'm used to developing for desktop browsers, I like using things like jQuery and advanced CSS features. It looks like I won't be able to use these things on a mobile platform.
What I was wondering is if anyone knew good developer's resources where I could find what works for mobile browsers (like a quirksmode.org for mobile devices).
As far as I know, jQuery won't work on mobile browsers (besides the iPhone). Does anyone know of any attempts to port jQuery in some form to mobile browsers? I say jQuery because that's what my existing website uses and I'd like to keep consistency, but if there are offerings from other frameworks, I'd be interested in checking them out too.
UPDATE
I wanted to update this to let anyone know who might stumble upon this question. The person who runs the site quirksmode.org has recently begun creating Mobile Device compatibility tables. You can check them out here:
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
Microsoft 和 RIM 都提供了其移动操作系统的模拟器。 我强烈建议下载它们。 它们可以搭载主机操作系统并使用您的以太网连接来检索 URL 并将其显示为现实世界中的对应项。
Both Microsoft and RIM have made emulators of their mobile operating systems available. I highly recommend downloading them. They can piggyback off the host operating system and use your ethernet connection to retrieve URLs and display them as their real-world counterparts.
OS4.5 及更早版本上提供的 BlackBerry 浏览器将不支持 jQuery。 它几乎不支持任何类型的动态 HTML。 OS 4.6 及更高版本(在 Bold、Pearl Flip、Storm 和更新的设备上)附带了一个新的渲染引擎,它对 DOM Level 2 和 CSS 有很好的支持。 它并不完美,但是很多使用 jQuery 的东西应该可以工作。 请注意,jQuery 为 DOM 操作增加了大量开销,从而大大降低了 javascript 代码的性能。 为了在 BlackBerry 上获得最佳结果,我建议如果可以的话直接使用 DOM 方法进行操作(例如使用 document.getElementById('foo') 而不是 $('foo')),因为它要快得多。
The BlackBerry browser that shipped on OS4.5 and older will not support jQuery. It barely supports any sort of dynamic HTML. There is a new rendering engine that ships with OS 4.6 and higher (on the Bold, Pearl Flip, Storm, and newer devices) that has pretty good support for DOM Level 2 and CSS. It's not perfect, but a lot of stuff that uses jQuery should work. Note that jQuery adds a lot of overhead to DOM manipulations that considerably slows down the performance of your javascript code. For best results on the BlackBerry, I suggest doing manipulations using DOM methods directly if you can (e.g use document.getElementById('foo') instead of $('foo')) as it is much faster.
移动资源的最佳位置是:
WURFL - wurfl.sourceforge.net/
MobiForge - http://www.mobiforge.com< /a>
移动元素 - http://www.mobileelements.com
一般来说,手机上的 JavaScript 支持相当不错糟糕,要么手机没有 JavaScript,要么实现有错误。
如今,业内很多人所做的就是制作 iPhone 和黑莓特定网站,并使用一项服务来检测浏览该网站的手机类型并重定向到最佳网站,这样您就可以充分利用很酷的新手机,而且还支持旧手机。
至于在设计网站时哪些手机最受欢迎,最好的地方是 Admob 指标 - http://www.admob.com/s/solutions/metrics
但当前列表是
Apple iPhone
Motorola Razr
诺基亚 N70
The best place for mobile resources are :
WURFL - wurfl.sourceforge.net/
MobiForge - http://www.mobiforge.com
Mobile Elements - http://www.mobileelements.com
In general JavaScript support on mobile phones is pretty poor, either the phone has no JavaScript or the implementation has bugs.
What alot of people do in the industry these days, is make iPhone and Blackberry specific sites and use a service to detect the type of mobile phone browsing the site and redirect to the best site, this way you are able to get the most out of the cool new phones, but also support the older phones.
As for which phones are the most popular for when you are designing your site, the best place is Admob metrics - http://www.admob.com/s/solutions/metrics
But the current list is
Apple iPhone
Motorola Razr
Nokia N70
最后我检查了 Windows Mobile IE 是 IE5 代码库的一个分支,所以在那里工作的东西,应该也可以在移动 IE 上工作。 然而,我记得一些限制(希望其他人可以澄清),我的印象是该列表不受支持。
至于 iPhone,除了 Flash 之外,它应该能完成 Safari 在 Windows/Mac 上所做的一切。
黑莓设备使用自己的专有浏览器,您必须查看是否有人有详细信息。
Last I checked the Windows Mobile IE was a fork from the IE5 codebase, so what worked there, should work on mobile IE. However I recall some limitations (hopefully others can clarify) I was under the impression that the list was not supported.
As for iPhone, outside of flash, it should do whatever Safari does on Windows/Mac.
Blackberry devices use their own proprietary browser, you'll have to see if someone has details on it.
您可能对 DeviceAtlas 感兴趣,用于确定设备功能。
You may be interested in DeviceAtlas, for determining device capabilities.