Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/376.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 在我的项目中包括jQuerySDK_Javascript_Jquery - Fatal编程技术网

Javascript 在我的项目中包括jQuerySDK

Javascript 在我的项目中包括jQuerySDK,javascript,jquery,Javascript,Jquery,我正在Mac上使用Sublime Text 2进行开发,我不知道如何在我的项目中包含jQuerySDK。我已经下载了SDK。要包含jQuery或任何其他需要使用标记的外部JS资源,例如: index.html: <html> <head> <title>My first jQuery page</title> <!--script src="/js/jquery.js" type="text/javascript"></s

我正在Mac上使用Sublime Text 2进行开发,我不知道如何在我的项目中包含jQuerySDK。我已经下载了SDK。

要包含jQuery或任何其他需要使用
标记的外部JS资源,例如:

index.html

<html>
<head>
  <title>My first jQuery page</title>
  <!--script src="/js/jquery.js" type="text/javascript"></script-->
  <script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.1/jquery.min.js" type="text/javascript"></script>
  <script type="text/javascript">
     $(function() {
       $("#test").html("It works!");
     });
  </script>
</head>
<body>
  <div id='test'></div>
</body>
</html>

我的第一个jQuery页面
$(函数(){
$(“#test”).html(“它可以工作!”);
});
注释掉的部分用于本地存储的jquery.js

从下载jquery.js并将这一行添加到html文件中

你好,米希克,你能告诉我jquery.js文件的位置吗。我在jquerysdk->repository->script中搜索。但是,我找不到一个。@Karthick-您的网页可以直接从Google的CDN或jquery网站包含jquery.js,但如果您想在项目中直接获得本地副本,您可以从中下载js-按“下载jquery”大按钮,然后选择您想要的版本。