当前位置:编程学习 > JAVA >>

(2)入门指南——(5)下载jquery(Downloading jQuery)

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拥有着速度优势,在开发时使用本地文件是很方便的。在整本书上,我门将使用存储在我们自己的系统中的本地文件,这将让我们无论联网与否都可以运行我们的代码。
补充:web前端 , JavaScript ,
CopyRight © 2022 站长资源库 编程知识问答 zzzyk.com All Rights Reserved
部分文章来自网络,