4<%@ 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 'test.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">
-->
<script src="js/jquery-2.1.1.min.js">
</script>
<style>
#div,#div2{
background-color:#bef3f3;
width:400px;
height:300px;
margin:10px;
position:relative;
overflow:hidden;
}
#div3,#div4{
background-color:#bff7f0;
width:150px;
height:100px;
margin:10px;
position:relative;
display:inline;
}
#div3{
float:left;
overflow:hidden;
}
#div4{
float:right;
}
</style>
</head>
<body>
<div id="div">
<input type="button" value="jquery加載js文件" id="button"><br>
<input type="button" value="jquery加載下拉框" id="button1"><br>
</div>
<div id="div2">
<div id="div3">
div3
</div>
<div id="div4">
div4
</div>
</div>
</body>
<script language="JavaScript">
$("#button").click(function(){
$("#div3").load("test2/test3.jsp");
});
$("#button1").click(function(){
$("#div4").load("test2/test2.jsp");
});
</script>
</html>
創(chuàng)新互聯(lián)是一家專業(yè)提供甘南企業(yè)網(wǎng)站建設(shè),專注與成都網(wǎng)站設(shè)計(jì)、網(wǎng)站建設(shè)、外貿(mào)網(wǎng)站建設(shè)、H5頁面制作、小程序制作等業(yè)務(wù)。10年已為甘南眾多企業(yè)、政府機(jī)構(gòu)等服務(wù)。創(chuàng)新互聯(lián)專業(yè)的建站公司優(yōu)惠進(jìn)行中。
分享名稱:jquery的load加載js頁面到指定div中
分享網(wǎng)址:http://aaarwkj.com/article34/pcocse.html
成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供電子商務(wù)、網(wǎng)站建設(shè)、網(wǎng)站導(dǎo)航、微信公眾號(hào)、網(wǎng)站設(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í)需注明來源: 創(chuàng)新互聯(lián)