(2)入門指南——(5)下載jquery(Downloading jQuery)

來源:互聯網
上載者:User

No installation is required. To use jQuery, we just need a publicly available copy of the file, whether that copy is on an external site or our own. As JavaScript is an interpreted language, there is no compilation or build phase to worry about. Whenever we need a page to have jQuery available, we will simply refer to the file's location from a <script>element in the HTML document.無需安裝。為了使用jquery我們需要一份這個檔案公開可用的複製,無論是在一個外部網站上還是我們自己網站上擷取的。正如js是解釋型的語言,不必擔心編譯和產生階段。無論什麼時候我們需要讓jquery在一個網頁上可用,我們只需要簡單的在html文檔中的<script>元素中添加上檔案的地址就可以了。The official jQuery website (http://jquery.com/) always has the most up-to-date, stable version of the library, which can be downloaded right from the home page of the site. Several versions of jQuery may be available at any given moment; the most appropriate for us as site developers will be the latest uncompressed version of the library. This can be replaced with a compressed version in production environments.官方網站(http://jquery.com)總是擁有最新的穩定的jquery版本,你可以直接從網站的首頁下載。在任何時刻都有幾個jquery的版本是有效,對我們這些作為網站的開發人員的人來說,最合適的版本是最新的未壓縮的版本。在生產環境中可以使用壓縮版本代替。 As jQuery's popularity has grown, companies have made the file freely available through their Content Delivery Networks(CDNs). Most notably, Google (http://code.google.com/apis/ajaxlibs/documentation/), and Microsoft (http://www.asp.net/ajax/cdn) offer the file on powerful, low-latency servers distributed around the world for fast download regardless of the user's location. While a CDNhosted copy of jQuery has speed advantages due to server distribution and caching, using a local copy can be convenient during development. Throughout this book we'll use a copy of the file stored on our own system, which will allow us to run our code whether we're connected to the Internet or not.隨著jquery流行性的增長,一些公司使這些檔案可以通過他們的內容分髮網絡(CDNs)變的免費可用。最顯著的是Google(http://code.google.com/apis/ajaxlibs/documentation/)和微軟的(http://www.asp.net/ajax/cdn)在有力的低延遲的分佈於全世界的伺服器商提供了這些檔案,用以快速下載而不用關心使用者的位置。雖然由於分布式伺服器和緩衝的作用使用CDN主機上的jquery擁有著速度優勢,在開發時使用本地檔案是很方便的。在整本書上,我門將使用儲存在我們自己的系統中的本地檔案,這將讓我們無論連網與否都可以運行我們的代碼。

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.