easyUI引用必要的css,js文件示例 基础(三)--cdn
2017-07-28 10:51
519 查看
easyUI中CDN
1.
easyui中的调用(css、js文件的调用)-----CDN的引用
这个就像你在用jquery库的时候类似都要调用里边一些必要的js等的库文件(现成已经编辑好的,你直接使用就好)
(1)easyUI调用网络上现成的的文件
```
<link rel="stylesheet" type="text/css" href="http://www.w3cschool.cc/try/jeasyui/themes/default/easyui.css"> <link rel="stylesheet" type="text/css" href="http://www.w3cschool.cc/try/jeasyui/themes/icon.css">
<link rel="stylesheet" type="text/css" href="http://www.w3cschool.cc/try/jeasyui/demo/demo.css"> <script type="text/javascript" src="http://code.jquery.com/jquery-1.4.4.min.js"></script>
<script type="text/javascript" src="http://www.w3cschool.cc/try/jeasyui/jquery.easyui.min.js"></script>
这是其中的一种示例调用w3C里边的,也可以调用其他的例如:
```
<link
rel="stylesheet" type="text/css" href="http://www.jeasyui.net/Public/js/easyui/themes/default/easyui.css">
<link rel="stylesheet" type="text/css" href="http://www.jeasyui.net/Public/js/easyui/themes/icon.css"><script
type="text/javascript" src="http://code.jquery.com/jquery-1.6.1.min.js"></script><script
type="text/javascript" src="http://www.jeasyui.net/Public/js/easyui/jquery.easyui.min.js"></script>```
也可以使用这个(根据自己的需求灵活选择变动)
```
<link rel="stylesheet" href="http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css"
/><script src="http://code.jquery.com/jquery-1.9.1.js"></script><script
src="http://code.jquery.com/ui/1.10.3/jquery-ui.js"></script><link
rel="stylesheet" href="http://jqueryui.com/resources/demos/style.css" />```
(2)本地上的调用
第一步先下载官网上的现成easyUI的文档解压后打开如下:
第二步:导入到你的项目
我用的是myeclipse工具,你也可以根据自己用的工具灵活套用一下思路类似;
先把jquery-easyui-1.5.2的包导入到项目中;
第三部的就是像第一步中的引用(一些必备的包):
```
<link
href="../easyui1.5.2/theme/default/easyui.css" rel="stylesheet" type="text/css" />
<link
href="../easyui1.5.2/theme/icon.css"
rel="stylesheet"
type="text/css"
/>
<link
rel="stylesheet"
href="../easyui1.5.2/themes/metro/datagrid.css"
type="text/css"></link>
<script
type="text/javascript"
src="../easyui1.5.2/jquery.easyui.min.js"></script>
<script
type="text/javascript"
src="../jquery-3.1.1/jquery-3.1.1.min.js"></script>
<script
type="text/javascript"
src="../easyui1.5.2/plugins/jquery.pagination.js"></script>```
注意:要找到文件的位置 ,src=“”这个路径一定要写正确,不然调用失败的。我用的myeclipse的话可以直接找到 包的位置直接点击拉取到你想用的html文件中就可以(自动把引入文档写好)。
1.
easyui中的调用(css、js文件的调用)-----CDN的引用
这个就像你在用jquery库的时候类似都要调用里边一些必要的js等的库文件(现成已经编辑好的,你直接使用就好)
(1)easyUI调用网络上现成的的文件
```
<link rel="stylesheet" type="text/css" href="http://www.w3cschool.cc/try/jeasyui/themes/default/easyui.css"> <link rel="stylesheet" type="text/css" href="http://www.w3cschool.cc/try/jeasyui/themes/icon.css">
<link rel="stylesheet" type="text/css" href="http://www.w3cschool.cc/try/jeasyui/demo/demo.css"> <script type="text/javascript" src="http://code.jquery.com/jquery-1.4.4.min.js"></script>
<script type="text/javascript" src="http://www.w3cschool.cc/try/jeasyui/jquery.easyui.min.js"></script>
这是其中的一种示例调用w3C里边的,也可以调用其他的例如:
```
<link
rel="stylesheet" type="text/css" href="http://www.jeasyui.net/Public/js/easyui/themes/default/easyui.css">
<link rel="stylesheet" type="text/css" href="http://www.jeasyui.net/Public/js/easyui/themes/icon.css"><script
type="text/javascript" src="http://code.jquery.com/jquery-1.6.1.min.js"></script><script
type="text/javascript" src="http://www.jeasyui.net/Public/js/easyui/jquery.easyui.min.js"></script>```
也可以使用这个(根据自己的需求灵活选择变动)
```
<link rel="stylesheet" href="http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css"
/><script src="http://code.jquery.com/jquery-1.9.1.js"></script><script
src="http://code.jquery.com/ui/1.10.3/jquery-ui.js"></script><link
rel="stylesheet" href="http://jqueryui.com/resources/demos/style.css" />```
(2)本地上的调用
第一步先下载官网上的现成easyUI的文档解压后打开如下:
第二步:导入到你的项目
我用的是myeclipse工具,你也可以根据自己用的工具灵活套用一下思路类似;
先把jquery-easyui-1.5.2的包导入到项目中;
第三部的就是像第一步中的引用(一些必备的包):
```
<link
href="../easyui1.5.2/theme/default/easyui.css" rel="stylesheet" type="text/css" />
<link
href="../easyui1.5.2/theme/icon.css"
rel="stylesheet"
type="text/css"
/>
<link
rel="stylesheet"
href="../easyui1.5.2/themes/metro/datagrid.css"
type="text/css"></link>
<script
type="text/javascript"
src="../easyui1.5.2/jquery.easyui.min.js"></script>
<script
type="text/javascript"
src="../jquery-3.1.1/jquery-3.1.1.min.js"></script>
<script
type="text/javascript"
src="../easyui1.5.2/plugins/jquery.pagination.js"></script>```
注意:要找到文件的位置 ,src=“”这个路径一定要写正确,不然调用失败的。我用的myeclipse的话可以直接找到 包的位置直接点击拉取到你想用的html文件中就可以(自动把引入文档写好)。
相关文章推荐
- YII2框架引用js以及css 文件
- 【Node.js基础篇】(五)使用mime模块来响应css、js文件的请求
- 引用外部文件js或者css
- 解决MVC中使用BundleConfig.RegisterBundles引用Css及js文件发布后丢失的问题
- jsp引用css和js文件方法 以及 java web应用程序文件结构
- WebPart引用 .CSS 文件与 .JS文件
- SpringMVC项目笔记2--引用js、css等文件问题
- django引用static目录下的css,js文件304问题
- ASP.NET中母版页引用外部js或css文件无效,提示对象未定义解决方法
- asp.net 中引用js文件和css文件的方法
- web项目的WEB-INF/jsp文件下面的jsp页面引用webRoot文件夹下面的css,js等文件失败
- ASP.NET动态引用样式表(css)和脚本(js)文件
- jsp动态引用js或css文件
- 解决MVC中使用BundleConfig.RegisterBundles引用Css及js文件发布后丢失的问题
- 关于SpringMVC下无法引用外部的js,css文件错误
- BSP中如何引用外部文件(JS/CSS等)及复杂功能的组织实现
- asp.net后台代码动态添加JS文件和css文件的引用
- 关于Master Page的css和js文件引用问题
- 引用外部.css或.js文件的路径问题
- 自己总结的CSS以及JS各种库的在线CDN引用地址,链接可以直接复制(不定期更新)