<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=GBK" />
<title>JQ_iframe</title>
<style type="text/css">
.divTl{
cursor:pointer;background-color:#ccc;width:150px;height:30px;line-height:30px;
}
</style>
<script type="text/javascript" src="jquery.js"></script>
<script>
$(function(){
reloadpage("order1.html");
//点击order1时加载页面1
$("#order1").click(function(){
reloadpage("order1.html");
});
//页面加载就执行'上面'已经定义好的点击事件
//$("#order1").trigger("click");
//点击order2时加载页面2
$("#order2").click(function(){
reloadpage("order2.html");
});
});
//加载页面
function reloadpage(page){
$.ajax({
url: page,
type: "POST",
dataType: 'html',
success: function(date){
$("#showcontext").html(date);
}
});
}
</script>
</head>
<body>
<table width="300" align="center">
<tr>
<td height="40" colspan="2" align="center">这是头部</td>
</tr>
<tr>
<td width="200" height="140">
<div id="order1" align="center" class="divTl" >页面1</div>
<p>
<div id="order2" align="center" class="divTl">页面2</div>
</td>
<td rowspan="2" align="center"><div style="display:inline;" align="center" id="showcontext"></div></td>
</tr>
</table>
</body>
</html>
Jquery实现iframe功能
需积分: 5 160 浏览量
2013-11-17
19:10:09
上传
评论
收藏 25KB RAR 举报
被挤的奶牛
- 粉丝: 88
- 资源: 28
最新资源
- Ruby基于Ruby的MKS rebase脚本 Ruby语言基础
- 基于GPT+Pyhon开发的网页游戏,类似于最火的文字游戏《人生重开模拟器》源码
- 基于qt+C++实现u盘插拔检测.+源码(毕业设计&课程设计&项目开发)
- rust开发封装的windows gui源码
- checkpoint.zip
- 无人机姿态和轨迹跟踪控制-反步控制方法
- 基于Qt+opencv+C++实现图像旋转+自动&&手动+直线检测,角度计算+界面操作+源码(期末大作业&课程设计&项目开发)
- Object-CC++对象库,实现类似于Java的Object类的Object
- 基于servlet的简单游戏管理系统
- 广工基于Libero的数字逻辑设计仿真及验证实验报告
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈