成人午夜视频全免费观看高清-秋霞福利视频一区二区三区-国产精品久久久久电影小说-亚洲不卡区三一区三区一区

web項(xiàng)目如何引入jqueryEasyUI

這篇文章將為大家詳細(xì)講解有關(guān)web項(xiàng)目如何引入jquery EasyUI,小編覺(jué)得挺實(shí)用的,因此分享給大家做個(gè)參考,希望大家閱讀完這篇文章后可以有所收獲。

為維西等地區(qū)用戶提供了全套網(wǎng)頁(yè)設(shè)計(jì)制作服務(wù),及維西網(wǎng)站建設(shè)行業(yè)解決方案。主營(yíng)業(yè)務(wù)為網(wǎng)站設(shè)計(jì)制作、網(wǎng)站建設(shè)、維西網(wǎng)站設(shè)計(jì),以傳統(tǒng)方式定制建設(shè)網(wǎng)站,并提供域名空間備案等一條龍服務(wù),秉承以專業(yè)、用心的態(tài)度為用戶提供真誠(chéng)的服務(wù)。我們深信只要達(dá)到每一位用戶的要求,就會(huì)得到認(rèn)可,從而選擇與我們長(zhǎng)期合作。這樣,我們也可以走得更遠(yuǎn)!

web項(xiàng)目引入jquery EasyUI的方法:首先下載jQuery easyui插件;然后將相關(guān)文檔考到項(xiàng)目的webapp下面;最后頁(yè)面引入下面幾個(gè)文件即可使用jquery easyui的的所有功能了。

web項(xiàng)目引入jquery EasyUI的方法:

jQuery easyui是一個(gè)基于jquery的用戶界面插件集合,可以做出各種炫酷頁(yè)面效果,大中型項(xiàng)目都可以使用些框架,非常好用,而且它有中文網(wǎng),提供了大量的demo.下面我們看怎么將它引入到項(xiàng)目中

一:下載地址

http://www.jeasyui.com/download/index.PHP

二:下載解壓,將相關(guān)文檔考到項(xiàng)目的webapp下面,因?yàn)樗峁┝苏f(shuō)明文檔,demo,這些不需要考到項(xiàng)目中

三:頁(yè)面引入下面幾個(gè)文件即可使用jquery easyui的的所有功能了

<link rel="stylesheet" type="text/css" href="<c:url value="/themes/default/easyui.css"/>">
<link rel="stylesheet" type="text/css" href="<c:url value="/themes/icon.css"/>">
<script type="text/JavaScript" src="<c:url value="/jquery.min.js"/>"></script>
<script type="text/javascript" src="<c:url value="/jquery.easyui.min.js"/>"></script>

也可以將這個(gè)放到一個(gè)公共的頁(yè)面中,因?yàn)樗许?yè)面都要引用這四句話。其它頁(yè)面引用這個(gè)公共頁(yè)面即可

<%@ include file="./commonpage/easyuisupport.jsp" %>

實(shí)例:

<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">
<title>My JSP '01.jsp' starting page</title>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<!--
<link rel="stylesheet" type="text/css" href="styles.css">
-->
<!-- 引入JQuery -->
<script type="text/javascript" src="${pageContext.request.contextPath}/jquery-easyui-1.5.2/jquery.min.js"></script>
<!-- 引入EasyUI -->
<script type="text/javascript" src="${pageContext.request.contextPath}/jquery-easyui-1.5.2/jquery.easyui.min.js"></script>
<!-- 引入EasyUI的中文國(guó)際化js,讓EasyUI支持中文 -->
<script type="text/javascript" src="${pageContext.request.contextPath}/jquery-easyui-1.5.2/locale/easyui-lang-zh_CN.js"></script>
<!-- 引入EasyUI的樣式文件-->
<link rel="stylesheet" href="${pageContext.request.contextPath}/jquery-easyui-1.5.2/themes/default/easyui.css" type="text/css"/>
<!-- 引入EasyUI的圖標(biāo)樣式文件-->
<link rel="stylesheet" href="${pageContext.request.contextPath}/jquery-easyui-1.5.2/themes/icon.css" type="text/css"/>
<script type="text/javascript">
$(function(){
//console.info($('#dd2'));
/*使用JavaScript動(dòng)態(tài)創(chuàng)建EasyUI的Dialog的步驟:
1、定義一個(gè)div,并給div指定一個(gè)id
2、使用Jquery選擇器選中該div,然后調(diào)用dialog()方法就可以創(chuàng)建EasyUI的Dialog
*/
$('#dd2').dialog();//使用默認(rèn)的參數(shù)創(chuàng)建EasyUI的Dialog
//使用自定義參數(shù)創(chuàng)建EasyUI的Dialog
$('#dd3').dialog({
title: '使用JavaScript創(chuàng)建的Dialog',
width: 400,
height: 200,
closed: false,
cache: false,
modal: true
});
});
</script>
</head>
<body>
This is my JSP page. <br>
<div class="easyui-dialog" id="dd1" title="EasyUI Dialog" style="width: 500px;height: 300px;">
Hello World!
</div>
<div id="dd2">Dialog Content</div>
<div id="dd3">Dialog Content</div>
</body>
</html>

ps:jquery引入路徑解釋:jquery/jquery-1.8.3.min.js以當(dāng)前頁(yè)面test.jsp為坐標(biāo)在當(dāng)前文件夾中查找,由于test.jsp和jquery文件夾都在webroot目錄下所以不需要

'/',如果加'/'意思是從項(xiàng)目根目錄查找

關(guān)于web項(xiàng)目如何引入jquery EasyUI就分享到這里了,希望以上內(nèi)容可以對(duì)大家有一定的幫助,可以學(xué)到更多知識(shí)。如果覺(jué)得文章不錯(cuò),可以把它分享出去讓更多的人看到。

本文名稱:web項(xiàng)目如何引入jqueryEasyUI
網(wǎng)頁(yè)鏈接:http://jinyejixie.com/article26/ppsejg.html

成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供搜索引擎優(yōu)化、手機(jī)網(wǎng)站建設(shè)做網(wǎng)站、網(wǎng)站建設(shè)、App設(shè)計(jì)、網(wǎng)站收錄

廣告

聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請(qǐng)盡快告知,我們將會(huì)在第一時(shí)間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如需處理請(qǐng)聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時(shí)需注明來(lái)源: 創(chuàng)新互聯(lián)

網(wǎng)站建設(shè)網(wǎng)站維護(hù)公司