Skip to content

Commit eab7422

Browse files
committed
add jquery-load demo
1 parent 3d21284 commit eab7422

File tree

13 files changed

+10539
-0
lines changed

13 files changed

+10539
-0
lines changed

jquery-load/jquery-1.11.2.js

Lines changed: 10346 additions & 0 deletions
Large diffs are not rendered by default.

jquery-load/load.html

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<!doctype html>
2+
<html>
3+
<head>
4+
<meta charset="utf-8">
5+
<meta name="author" content="奋斗网 - itstrive.com" />
6+
<meta name="copyright" content="奋斗网 - itstrive.com" />
7+
<title>奋斗网— http://www.itstrive.com</title>
8+
<style>
9+
</style>
10+
<script src="jquery-1.11.2.js"></script>
11+
<script>
12+
$(function(){
13+
$(document).click(function(){
14+
$('#div1').load('tpl.html');
15+
});
16+
});
17+
</script>
18+
</head>
19+
20+
<body>
21+
<div id="div1"></div>
22+
</body>
23+
</html>

jquery-load/load2.html

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<!doctype html>
2+
<html>
3+
<head>
4+
<meta charset="utf-8">
5+
<meta name="author" content="奋斗网 - itstrive.com" />
6+
<meta name="copyright" content="奋斗网 - itstrive.com" />
7+
<title>奋斗网— http://www.itstrive.com</title>
8+
<style>
9+
</style>
10+
<script src="jquery-1.11.2.js"></script>
11+
<script>
12+
$(function(){
13+
$(document).click(function(){
14+
$('#div1').load('php1.php',{a:5,b:4});
15+
});
16+
});
17+
</script>
18+
</head>
19+
20+
<body>
21+
<div id="div1"></div>
22+
</body>
23+
</html>

jquery-load/load3.html

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<!doctype html>
2+
<html>
3+
<head>
4+
<meta charset="utf-8">
5+
<meta name="author" content="奋斗网 - itstrive.com" />
6+
<meta name="copyright" content="奋斗网 - itstrive.com" />
7+
<title>奋斗网— http://www.itstrive.com</title>
8+
<style>
9+
</style>
10+
<script src="jquery-1.11.2.js"></script>
11+
<script>
12+
$(function(){
13+
$(document).click(function(){
14+
$('#div1').load('php2.php',{'arr':[1,2,3]});
15+
});
16+
});
17+
</script>
18+
</head>
19+
20+
<body>
21+
<div id="div1"></div>
22+
</body>
23+
</html>

jquery-load/load4.html

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
<!doctype html>
2+
<html>
3+
<head>
4+
<meta charset="utf-8">
5+
<meta name="author" content="奋斗网 - itstrive.com" />
6+
<meta name="copyright" content="奋斗网 - itstrive.com" />
7+
<title>奋斗网— http://www.itstrive.com</title>
8+
<style>
9+
#div1{ width:300px; height:300px; background:#ccc; color:#fff; display:none; font-size:50px; text-align:center; line-height:300px;}
10+
</style>
11+
<script src="jquery-1.11.2.js"></script>
12+
<script>
13+
$(function(){
14+
$(document).click(function(){
15+
$('#div1').load('php3.php',{'arr':[1,2,3]},function(){
16+
$('#div1').fadeIn('slow');
17+
});
18+
});
19+
});
20+
</script>
21+
</head>
22+
23+
<body>
24+
<div id="div1"></div>
25+
</body>
26+
</html>

jquery-load/load5.html

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<!doctype html>
2+
<html>
3+
<head>
4+
<meta charset="utf-8">
5+
<meta name="author" content="奋斗网 - itstrive.com" />
6+
<meta name="copyright" content="奋斗网 - itstrive.com" />
7+
<title>奋斗网— http://www.itstrive.com</title>
8+
<style>
9+
#div1{ width:300px; height:300px; background:#ccc; color:#fff; display:none;}
10+
</style>
11+
<script src="jquery-1.11.2.js"></script>
12+
<script>
13+
$(function(){
14+
$('#div1').load('tpl2.html #div2',function(){
15+
$('#div1').fadeIn('slow');
16+
});
17+
});
18+
</script>
19+
</head>
20+
21+
<body>
22+
<div id="div1"></div>
23+
</body>
24+
</html>

jquery-load/load6.html

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<!doctype html>
2+
<html>
3+
<head>
4+
<meta charset="utf-8">
5+
<meta name="author" content="奋斗网 - itstrive.com" />
6+
<meta name="copyright" content="奋斗网 - itstrive.com" />
7+
<title>奋斗网— http://www.itstrive.com</title>
8+
<style>
9+
#div1{ width:300px; height:300px; background:#ccc; color:#fff; display:none;}
10+
</style>
11+
<script src="jquery-1.11.2.js"></script>
12+
<script>
13+
$(function(){
14+
$('#div1').load('https://www.baidu.com/',function(){
15+
$('#div1').fadeIn('slow');
16+
});
17+
});
18+
</script>
19+
</head>
20+
21+
<body>
22+
<div id="div1"></div>
23+
</body>
24+
</html>

jquery-load/php1.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<?php
2+
$a=$_POST['a'];
3+
$b=$_POST['b'];
4+
echo $a+$b;
5+
?>

jquery-load/php2.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<?php
2+
var_dump(json_encode($_POST['arr']));
3+
?>

jquery-load/php3.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<?php
2+
$arr=$_POST['arr'];
3+
4+
echo $arr[0];
5+
?>

jquery-load/php4.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<?php
2+
$arr=$_POST['arr'];
3+
4+
echo $arr[0];
5+
?>

jquery-load/tpl.html

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<ul>
2+
<li>新闻一</li>
3+
<li>新闻二</li>
4+
<li>新闻三</li>
5+
<li>新闻四</li>
6+
<li>新闻五</li>
7+
</ul>

jquery-load/tpl2.html

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<!doctype html>
2+
<html>
3+
<head>
4+
<meta charset="utf-8">
5+
<meta name="author" content="奋斗网 - itstrive.com" />
6+
<meta name="copyright" content="奋斗网 - itstrive.com" />
7+
<title>奋斗网— http://www.itstrive.com</title>
8+
<style>
9+
</style>
10+
<script>
11+
12+
</script>
13+
</head>
14+
15+
<body>
16+
<div id="div2">
17+
<ol>
18+
<li>1111页面更新了</li>
19+
<li>222</li>
20+
<li>3333</li>
21+
<li>4444</li>
22+
</ol>
23+
</div>
24+
</body>
25+
</html>

0 commit comments

Comments
 (0)