問題描述
我正在尋找一個輕量級的 JavaScript 框架,其主要目的是抽象出瀏覽器的差異.我主要使用它來創(chuàng)建新的 UI 元素,除了能夠為我提供獨立于平臺的語言和 DOM 的東西之外,我不需要太多東西.
I'm looking for a lightweight JavaScript framework whose primary purpose is to abstract out browser differences. I are primarily using it to create new UI elements, and I don't need much other than something that gives me a platform independent language and DOM.
推薦答案
我目前使用的 JS 庫有 3 個:Prototype、jQuery 和 MooTools.Prototype 和 jQuery 是使用最廣泛的.jQuery 和 MooTools 是最輕量級的.
There are 3 JS libraries that I currently use: Prototype, jQuery and MooTools. Prototype and jQuery are the most widely used. jQuery and MooTools are the most lightweight.
MooTools 在他們的網(wǎng)站上有一個很好的功能,它允許您構(gòu)建一個自定義的壓縮 .js 文件,其中只包含您需要的模塊,根據(jù)您正在做的事情制作最輕量級的文件.jQuery 擁有更高的粉絲群,并因此獲得更好的支持.
MooTools has a nice feature on their site that allows you to build a custom compressed .js file with only the modules you need, making the lightest, depending on what you're doing. jQuery has a much higher fan base, and better support because of it.
在這 3 個中,我推薦 jQuery,但看看所有可用的選項可能不是一個壞主意.
Of the 3, I'd recommend jQuery, but it's probably not a bad idea to take a look at all the options available.
這篇關(guān)于最好的輕量級 JavaScript 框架是什么?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網(wǎng)!