ZhiYeJianKang_PeiXun/Song.Site/Templates/Web/_Public/Pagebox.htm
2025-02-20 15:41:53 +08:00

56 lines
1.3 KiB
HTML

<!doctype html>
<html>
<head>
<title></title>
<vt:include file="inc/meta.inc" />
<style type="text/css">
.btn {
font-size: 16px;
line-height: 30px;
height: 30px;
width: 100px;
background-color: #FFC;
text-align: center;
border: 1px solid #6C0;
cursor: pointer;
}
</style>
</head>
<body>
<div id="time">测试刷新(关闭子窗体,刷新父窗体):<span></span></div>
<a class="btn" name="open" href="pagebox.cshtm">弹出窗口</a> <br/>
<a class="btn" name="getname" href="pagebox.cshtm">当前窗口名称</a><br/>
<a class="btn" name="getpath" href="pagebox.cshtm">测试路径获取</a>
</body>
<script>
$("#time span").text(new Date().Format("yyyy年M月d日 hh:mm:ss"));
</script>
<script>
$(".btn[name=open]").click(function(){
var href=$(this).attr("href");
var win=new window.top.PageBox("测试",href,60,60,null,window.name);
win.CloseEvent=function(box,pbox){
var iframe=pbox.find("iframe");
if(iframe.size()>0){
iframe.attr("src",iframe.attr("src"));
}else{
window.location.href=window.location.href;
}
}
win.Open();
return false;
});
$(".btn[name=getname]").click(function(){
alert(window.name);
return false;
});
$(".btn[name=getpath]").click(function(){
var path=window.top.PageBox.getCurrPath(window.name,$(this).attr("href"));
alert(path);
return false;
});
</script>
</html>