用vsftp部署一个功能强大的ftp服务器
2013-08-18 08:20
260 查看
当在线项目使用js的时候,我们通常把js库打包到服务器上发布,我常遇到一些问题:项目的文档结构迁移的时候重构非常的麻烦.
引用的js库各家都一样,无形中浪费了带宽,Google的 jsapi就是集中管理这些js库用的.
这个是官网,上面的说明很清楚了,我这里罗嗦一下
它支持的js库包括
jQuery
jQuery UI
Prototype
script.aculo.us
MooTools
Dojo
SWFObject
Yahoo! User Interface Library (YUI)
使用这个API首先需要引入Google的js库,在<head>里头加上
ok,它主要有2个函数,分别是加载js库的 load(js库名,版本) 和 类似onload的函数(在加载完js库后触发)
直接抓一个例子过来,加载jQuery 1.3.2
引用
最后它还有一个模拟器让大伙折磨 >.<
引用的js库各家都一样,无形中浪费了带宽,Google的 jsapi就是集中管理这些js库用的.
这个是官网,上面的说明很清楚了,我这里罗嗦一下
它支持的js库包括
jQuery
jQuery UI
Prototype
script.aculo.us
MooTools
Dojo
SWFObject
Yahoo! User Interface Library (YUI)
使用这个API首先需要引入Google的js库,在<head>里头加上
<script src="http://www.google.com/jsapi"></script>
ok,它主要有2个函数,分别是加载js库的 load(js库名,版本) 和 类似onload的函数(在加载完js库后触发)
直接抓一个例子过来,加载jQuery 1.3.2
引用
<script src="http://www.google.com/jsapi"></script><script>
// Load jQuery
google.load("jquery", "1.3.2");
// on page load complete, fire off a jQuery json-p query
// against Google web search
google.setOnLoadCallback(function() {
$.getJSON("http://ajax.googleapis.com/ajax/services/search/web?q=google&v=1.0&callback=?",
// on search completion, process the results
function (data) {
if (data.responseData.results &&
data.responseData.results.length > 0) {
var results = data.responseData.results;
for (var i=0; i < results.length; i++) {
// Display each result however you wish
alert(results[i].titleNoFormatting);
}
}
});
});
</script>
最后它还有一个模拟器让大伙折磨 >.<
相关文章推荐
- 用vsftp部署一个功能强大的ftp服务器
- 一个最简单的例子,清楚说明回调函数的作用和强大功能
- Inxi:一个功能强大的获取 Linux 系统信息的命令行工具
- WebLech是一个功能强大的Web站点下载与镜像工具
- Task是.net 4.0中的一个新特性,提供的功能非常强大,下面是其具体的使用方法演示:
- Jcrop是一个功能强大的图像裁剪引擎
- LFTP : 一个功能强大的命令行FTP程序
- 一个功能强大的 TextView,可以满足日常大部分布局方式,开发者可已自行组合属性配置出属于自己风格的样式!
- 创建并部署一个Servlet,要求在实现用户登录功能,当用户名和密码正确时跳转到欢迎页面,否则提示出错信息
- 一个简单、漂亮、功能强大的Android日志程序:logger
- Altium designer之装配变量(Variant Management) - 一个强大的功能
- SharePoint 2016 vs部署报错:无法加载功能xxx未能加载文件或程序集xxx或它的某一个依赖项。系统找不到指定的文件
- 介绍一个功能强大的API函数 ShellExecute
- 交流一下大家都用什么代码管理工具?每人写一个过程,10万个人就有10万个功能,无比强大****
- XAMPP(Apache+MySQL+PHP+PERL)是一个功能强大的建 XAMPP 软
- Arduino Tian开发板:一个功能强大的天气预报中心
- 一个功能强大而齐全的数据库操作类
- 一个功能强大的MFC界面处理扩展库:CJ60Lib简介
- SharePoint 2016 vs部署报错:无法加载功能xxx未能加载文件或程序集xxx或它的某一个依赖项。系统找不到指定的文件
- 水晶报表是一个功能强大的报表工具2005