What cross-browser JavaScript libraries exist? [cl

2020-06-09 06:26发布

问题:

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 7 years ago.

I'm gearing up to do some Ajax style client-side JavaScript code in the near future, and I've heard rave reviews of jQuery when it comes to this realm. What I'm wondering is:

  • What are all the cross-browser JavaScript libraries out there?

What is the experience using them?

回答1:

An excellent resource is Jeff Atwood's post on JavaScript libraries.

He lists:

  1. Prototype and Script.aculo.us
  2. jQuery
  3. Yahoo UI Library
  4. Ext JS
  5. Dojo
  6. MooTools


回答2:

ALL the cross browser JavaScript libraries out there? You do realize that there are well over 100 libraries out there, so you should narrow this down a little, IMO.

A good place to start is with Wikipedia's Comparison of JavaScript frameworks, which covers Dojo, Ext JS, jQuery, midori, MochiKit, MooTools, Prototype & script.aculo.us, qooxdoo, YUI, and SweetDEV RIA.



回答3:

Prototype FTW.

I do like jQuery, but Prototype serves my needs most of the time. It may just be because I'm more familiar with it, but I seem to get stuff done faster in Prototype than in jQuery.



回答4:

I want to report this almost unknown library entitled: "BBC Glow".

Other libraries are praised for bells and whistles, but Glow is about cross-browser support. The project has a clear statement about its goals, and there is also a browsers support table.

It is a solid starting point.



回答5:

Most of the existing answers are either gateways to slimy marketing or libraries long past their due date.

What is conveyed as "cross-browser" is most often "multi-browser", meaning a small umbrella of browsers. Libraries such as Dojo Toolkit and Ext JS (anything by Sencha, really) are guilty of this behavior. jQuery used to behave similarly before some loud calls for sane code arose (the project still has a giant mountain to climb yet). "Cross-browser" most often refers to abstractions for the DOM and a few other APIs.

I've recently completed an HTML DOM library that covers a very wide range of browsers, which I think may interest the community here. The current list is:

  • Internet Explorer 5-9;
  • Firefox 1-13;
  • Opera 5-12;
  • Safari 3.1-5;
  • Chrome 1-4 (presumed to work on all Chrome builds, but Chrome versions remain difficult to test independently); which is the second-widest coverage I've encountered, just trailing another, which I will mention in the next paragraph. The library I've created is entitled: "Matt's DOM Utils" (Utils) and can be accessed via GitHub[[0]] or my own site[1]. It's fully modular and focuses specifically on DOM traversal while providing other utilities such as an Element::classList module.

However, the most comprehensive DOM library on the Internet is David Mark's "My Library". The library contains a giant pile of utilities, with coverage for nearly all browsers beyond Netscape 4. It has a pseudo-modular build stage, and can be very minimal if desired. It can be accessed via GitHub[2] or David's site[3]. I suggest to anyone reading this thread to give that API a thorough glance. I have learned immensely from both the author and the code itself.



回答6:

If you want to jump on the same bandwagon everyone else does, jQuery is the end-all, be-all. You don't have to think, just listen to everyone else. :P

Personally, I use and love MochiKit. It seems to do everything jQuery does, but the philosophy is a bit different and the community is by far smaller. There are not tons of additional plugins, but there are some. It was designed with a lot of Pythonic style and functional programming constructs, so if that sounds interesting to you, you might want to take a look.



回答7:

jQuery.

(Added so as to have an entry for voting.)



回答8:

Loads!

jQuery, Prototype, Ext JS, Dojo, MooTools, YUI, Mochikit, the list goes on!

jQuery is very popular, and an excellent choice. However, some frameworks are better for some things, and others better for others. If you could give us a better idea of what you want to do, or how you will be using it (or even which other languages you use) we'd be able to give you a nudge towards one or the other.



回答9:

The list that Dori posted is pretty comprehensive, and I don't think that it's possible to list all the libraries out there since there might be one being written even as I type (it seems to be a passion for some people).

I feel that going with jQuery and/or Prototype will probably get you off the ground and building neat stuff pretty quickly, and chances are that you will fall in love with them as so many of us have.

Gucci had Thomas Fuchs (the creator of script.aculo.us) create their website without using Flash, but check it out, it looks amazing for being JavaScript / CSS only.

A post about it is Gucci Relaunches on Script.aculo.us.

These libraries are so powerful and versatile (with some nice plugins) that you won't "hit the wall" and start looking to other libraries anytime soon.

I have also seen people do some nice stuff with Dojo and Ext JS, but I have never worked with them myself.



回答10:

I like jQuery. Prototype is very similar. There are several others but I highly recommend you evaluate them yourself.



回答11:

I prefer Mootools because it is lightweight and is based on Prototype, but like Jay said you should check them out for yourself.



回答12:

Do have a closer look at MooTools.



回答13:

I can't think of doing any JavaScript development without using jQuery (also take a deep look to jQuery UI).



回答14:

jQuery is a good choice. It leans towards the 'skinny and speedy' side, and allows for some fantastic DOM manipulation.



回答15:

Of the popular ones are jQuery, Dojo Toolkit, Prototype (with Script.aculo.us) and MooTools. I'd encourage you to test out MooTools unless you're on ASP.NET in which case I'd encourage you to check out the project I am working on (Ra-Ajax) which is a fully server-side binded Ajax Framework for ASP.NET...