jQuery中断跳转

来源:互联网 发布:有关狐狸的网络电视剧 编辑:程序博客网 时间:2024/04/29 09:32
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title></title>
<link href="CSS/Menu.css" rel="stylesheet" type="text/css">
<link href="CSS/body.css" rel="stylesheet" type="text/css">
<script src="JS/jquery-3.1.1.min.js" type="text/javascript"></script>
<script type="text/javascript">
$(document).ready(function(){ 
  $.get("text.html",function(data){ //初始將a.html include div#iframe
$("#iframe").html(data);
}); 
$(function(){
$('.list-side li').click(function() {
 // 找出 li 中的超連結 href(.html)
var $this = $(this),
_clickTab = $this.find('a').attr('href'); // 找到連結a中的targer標籤值
$.get(_clickTab,function(data){

$("#iframe").html(data); 
alert($("#iframe").html());

});
return false;   //替代当前的外部跳转
})
})
});


</script>
</head>
<body>









<div class="container">
<div class="header"><h1 class="header">Nxin BigData</h1></div>


<ul>
<li><a class="active" href="#home">主页</a></li>
<li><a href="#news">最新动态</a></li>
<div class="dropdown">
<a href="#" class="dropbtn">ETL管理</a>
<div class="dropdown-content">
<a href="#">基础设置</a> <a href="#">作业管理</a> <a href="#">计划任务</a>
</div>
</div>
<div class="dropdown">
<a href="help" class="dropbtn">帮助</a>
<div class="dropdown-content">
<a href="#">帮助 1</a> <a href="#">帮助 2</a> <a href="#">帮助 3</a>
</div>
</div>

</ul>




<div class="left">


<ul class="list-side">
<li><a href="text.html" >About</a></li>
<li><a href="text2.html" >News</a></li>
<li><a href="servlet/runJob" >Product</a></li>
<li><a href="http://www.ucamc.com/" target="_blank" >UCAMC</a></li>
</ul>
<div id="iframe">
<!--jquery 插入html 位址-->


<p>"Never increase, beyond what is necessary, the number of entities required to explain anything." William of Ockham (1285-1349)</p>
</div>


</div>
<div class="content">
<h2>Free Web Building Tutorials</h2>
<p>At w3cschool you will find all the Web-building tutorials you need,
from basic HTML and XHTML to advanced XML, XSL, Multimedia and WAP.</p>
<p>w3cschool - The Largest Web Developers Site On The Net!</p></div>
<div class="content">
<h2>Free Web Building Tutorials</h2>
<p>At w3cschool you will find all the Web-building tutorials you need,
from basic HTML and XHTML to advanced XML, XSL, Multimedia and WAP.</p>
<p>w3cschool - The Largest Web Developers Site On The Net!</p></div>
<div class="content">
<h2>Free Web Building Tutorials</h2>
<p>At w3cschool you will find all the Web-building tutorials you need,
from basic HTML and XHTML to advanced XML, XSL, Multimedia and WAP.</p>
<p>w3cschool - The Largest Web Developers Site On The Net!</p></div>
<div class="content">
<h2>Free Web Building Tutorials</h2>
<p>At w3cschool you will find all the Web-building tutorials you need,
from basic HTML and XHTML to advanced XML, XSL, Multimedia and WAP.</p>
<p>w3cschool - The Largest Web Developers Site On The Net!</p></div>
<div class="content">
<h2>Free Web Building Tutorials</h2>
<p>At w3cschool you will find all the Web-building tutorials you need,
from basic HTML and XHTML to advanced XML, XSL, Multimedia and WAP.</p>
<p>w3cschool - The Largest Web Developers Site On The Net!</p></div>




<div class="footer">Copyright 2015-2025 by 农信互联 BigData.</div>
</div>

</body>
</html>
0 0
原创粉丝点击