標籤:des style blog http color io os 使用 java
官方定義:
write less ,do more :Lightweight Footprint、CSS3 Compliant、Cross-Browser
What is jQuery?
- jQuery is a fast, small, and feature-rich JavaScript library. It makes things like HTML document traversal and manipulation, event handling, animation, and Ajax much simpler with an easy-to-use API that works across a multitude of browsers. With a combination of versatility and extensibility, jQuery has changed the way that millions of people write JavaScript.
Wiki:
define:
- jQuery is a cross-platform JavaScript library designed to simplify the client-side scripting of HTML.
- jQuery is free, open source software, licensed under the MIT License.
- jQuery‘s syntax is designed to make it easier to navigate a document, select DOM elements, createanimations, handle events, and develop Ajax applications. jQuery also provides capabilities for developers to create plug-ins on top of the JavaScript library. This enables developers to create abstractions for low-level interaction and animation, advanced effects and high-level, theme-able widgets. The modular approach to the jQuery library allows the creation of powerful dynamic web pages and web applications.
overviw:
- jQuery, at its core, is a DOM manipulation library. The DOM is a tree structure representation of all the elements of a web-page and jQuery makes finding, selecting, and manipulating these DOM elements very simple and convenient. For example, jQuery can be used for finding an element in the document with a certain property (e.g. all elements with an h1 tag), changing one or more of its attributes (e.g. color, visibility), or making it respond to an event (e.g. a mouse click).
- However, beyond basic DOM selecting and manipulation, jQuery provides a new paradigm of writing event handling in Javascript. The event assignment and the event callback function are done in a single step in a single location in the code.
The advantages of using jQuery are:
- Separates Javascript and HTML: Instead of using HTML attributes to call Javascript functions for event handling, jQuery allows all event-handling functions to be done purely in Javascript. Thus, the HTML tags and Javascript can be completely separated.
- Brevity and Clarity: jQuery provides various syntaxes that promotes brevity and clarity, e.g. chaining effects and actions, shorthand methods.
- Eliminates cross-browser incompatibilities: The Javascript engines of different browsers differ slightly, so Javascript code that works for one browser may not work on the other. jQuery handles all these cross-browser inconsistencies and provides a consistent interface that works across different browsers.
jQuery includes the following features:
- DOM element selections using the multi-browser open source selector engine Sizzle, a spin-off of the jQuery project
- DOM traversal and modification (including support for CSS 1–3)
- DOM manipulation based on CSS selectors that uses node elements name and node elements attributes (id and class) as criteria to build selectors
- Events
- Effects and animations
- AJAX
- JSON parsing
- Extensibility through plug-ins
- Utilities - such as user agent information, feature detection
- Compatibility methods that are natively available in modern browsers but need fall backs for older ones - For example the
inArray() and each()functions.
- Multi-browser (not to be confused with cross-browser) support.
- multitude browsers support
百科定義:
什麼是jQuery?
- Jquery是繼prototype之後又一個優秀的Javascript架構。它是輕量級的js庫 ,它相容CSS3,還相容各種瀏覽器(IE 6.0+, FF 1.5+, Safari 2.0+, Opera 9.0+),jQuery2.0及後續版本將不再支援IE6/7/8瀏覽器。jQuery使使用者能更方便地處理HTML(標準通用標記語言 (SGML)下的一個應用)、events、實現動畫效果,並且方便地為網站提供AJAX互動。jQuery還有一個比較大的優勢是,它的文檔說明很全,而且各種應用也說得很詳細,同時還有許多成熟的外掛程式可供選擇。jQuery能夠使使用者的html頁面保持代碼和html內容分離,也就是說,不用再在html裡面插入一堆js來調用命令了,只需定義id即可。
- jQuery是免費、開源的,使用MIT許可協議。jQuery的文法設計可以使開發人員更加便捷,例如操作文檔對象、選擇DOM元素、製作動畫效果、事件處理、使用Ajax以及其他功能。除此以外,jQuery提供API讓開發人員編寫外掛程式。其模組化的使用方式使開發人員可以很輕鬆的開發出功能強大的靜態或動態網頁。
使用方法:
W3SCHOOL:(詳細學習請移步於此)
jQuery 是一個 JavaScript 函數庫。jQuery 庫可以通過一行簡單的標記被添加到網頁中。
jQuery 庫包含以下特性:
- HTML 元素選取
- HTML 元素操作
- CSS 操作
- HTML 事件函數
- JavaScript 特效和動畫
- HTML DOM 遍曆和修改
- AJAX
- Utilities
jQuery介紹