国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 編程 > JavaScript > 正文

利用JQuery的load函數動態加載其它頁面的內容的實現代碼

2019-11-21 00:02:39
字體:
來源:轉載
供稿:網友
在線演示:http://demo.VeVB.COm/js/JQueryload/index.htm
全部代碼
復制代碼 代碼如下:

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>JQuery - Load</title>
<link rel="stylesheet" media="all" type="text/css" href="../CSS/myStyle.css" />
<script type="text/javascript" src="http://demo.VeVB.COm/jslib/jquery/jquery-1.3.2.min.js"></script>
<style type="text/css">
#header {
margin-bottom: 1em;
padding-bottom: 1em;
border-bottom: 1px solid #eee;
}
.buttonListArea {
float: left;
width: 150px;
padding-right: 10px;
border-right: 1px solid #eee;
margin-right: 10px;
}
.buttonArea {
margin: 10px;
padding-bottom:20px;
}
#load_content {
float: left;
width: 550px;
text-align:center;
}
</style>
<script type="text/javascript">
$(document).ready(function() {
$('#btnLoad1.button').click(function() {
$('#load_content').load('loadContent1.htm');
});
$('#btnLoad2.button').click(function() {
$('#load_content').load('loadContent2.htm');
});
});
</script>
</head>
<body>
<form id="form1" runat="server">
<div id="container">
<div id="header">
<h2>JQuery Load Example</h2>
</div>
<div class="buttonListArea">
<div class="buttonArea">
<div class="button" id="btnLoad1">Load 1</div>
</div>
<div class="buttonArea">
<div class="button" id="btnLoad2">Load 2</div>
</div>
</div>
<div id="load_content">
<h2>這是要被加載的區域</h2>
</div>
</div>
</form>
</body>
</html>

loadContent1.htm
復制代碼 代碼如下:

VeVB.COm

loadContent2.htm
復制代碼 代碼如下:

sc.VeVB.COm

代碼打包下載
發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 夏津县| 襄汾县| 津南区| 教育| 远安县| 南乐县| 竹北市| 淮滨县| 田林县| 出国| 奎屯市| 凤阳县| 木兰县| 万载县| 郓城县| 井冈山市| 纳雍县| 奉节县| 马边| 铜陵市| 繁峙县| 辽宁省| 台东市| 枣庄市| 遂平县| 文昌市| 松桃| 那曲县| 古蔺县| 昭平县| 古田县| 新干县| 衡山县| 克什克腾旗| 乐都县| 额济纳旗| 广宁县| 苍山县| 永德县| 墨竹工卡县| 瑞安市|