Mobile Device Javascript/CSS Support. What's out there?

筅森魡賤 提交于 2019-12-03 12:13:31

问题


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:

http://quirksmode.org/m/


回答1:


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.




回答2:


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.




回答3:


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

  1. Apple iPhone

  2. Motorola Razr

  3. Nokia N70




回答4:


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.




回答5:


You may be interested in DeviceAtlas, for determining device capabilities.



来源:https://stackoverflow.com/questions/274868/mobile-device-javascript-css-support-whats-out-there

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!