首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > Web前端 >

JQuery库的增添

2013-01-21 
JQuery库的添加添加JQuery库的方式:1.从http://docs.jquery.com/Downloading_jQuery#Download_jQuery下载J

JQuery库的添加
添加JQuery库的方式:
1.从http://docs.jquery.com/Downloading_jQuery#Download_jQuery下载JQuery库,然后将下载下来的js文件放到你的jsp文件目录下(这里下载下来的js文件必须和jsp文件下的src中的名字一样,如下)。
在jsp中加入<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript">
  //jquery code
</script>

2.使用外部链接:
     使用 Google 的 CDN
    <head>
    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.0/jquery.min.js"></script>

   </head>
   使用 Microsoft 的 CDN
   <head>
   <script type="text/javascript" src="http://ajax.microsoft.com/ajax/jquery/jquery-1.4.min.js"></script>
   </head>

热点排行