如何调用谷歌Jquery

为了避免每次为了一个jquery效果都要放进去一个”jquery.min.js”或是”jquery.js”.

从google直接加载(调用)是一个很方便的办法,而且据传有缩短延迟,提高并行加载速度等好处.

 

 

 

代码
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>谷歌JSAPI测试</title>
<script src="http://www.google.com/jsapi"></script> 
<script type="text/javascript">
google.load(
"jquery","1.3.2");
google.setOnLoadCallback(
function(){
  $(document).ready(
function(){
  $(
"body").html("OK!");
      })
});
</script>
</head> <body>
<div id="gj"></div>
</body>
</html> 

 

 附:google AJAX API  google代码园地

相关文章:

  • 2022-01-09
  • 2021-04-04
  • 2021-04-15
  • 2021-11-15
  • 2021-11-16
  • 2021-11-26
  • 2021-07-28
  • 2021-06-03
猜你喜欢
  • 2021-10-08
  • 2021-06-05
  • 2021-06-19
  • 2022-01-10
  • 2022-12-23
  • 2021-08-18
  • 2021-11-27
相关资源
相似解决方案