jquery 如何实现iframe页面的切换
发布网友
发布时间:2023-02-16 07:50
我来回答
共1个回答
热心网友
时间:2023-09-16 20:04
Jquery弹出层窗口,并且背景变暗
先到 下载Jquery的Lee dialog插件,
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
<script language="javascript" src="dialog.js"></script>
<script language="javascript" src="Jquery.js"></script>
<style>
#floatBoxBg
.floatBox
.floatBox .title
.floatBox .title h4
.floatBox .title span
.floatBox .content
</style>
</head>
<body>
<script>
function aa()
{
dialog("我的标题","iframe:login.php","500px","auto","text"); // login.php 为要弹出的窗口
}
</script>
<a href="#" onclick="aa()" >Click Here</a>
</body>
</html>
关于这个dialog插件的其它用法:
get加载一个.html文件(也可以是.php/.asp?id=4之类的)
dialog("我的标题","test.html","200px","auto","text");
弹出纯文本内容
dialog("我的标题","text:我的内容","200px","auto","text"); 试试
弹出某id里面的html
页面有<div id="testID" style="display:none;"><h2>Lee dialog</h2></div>
dialog("我的标题","id:testID","300px","auto","id"); 试试
Lee dialog
加载一个页面以框架示
把blueidea加载进来,定义css:body .iframe .content复盖一下,因为.content默认padding:20px;
dialog("blueidea","iframe:","500px","500px","iframe");