<style type="text/css" media="all">
@import "thickbox/global.css";
@import "thickbox/thickbox.css";
</style>
<link rel="alternate stylesheet" type="text/css" href="thickbox/1024.css" title="1024 x 768" />
<script src="thickbox/jquery-1.1.3.1.pack.js" type="text/javascript"></script>
<script src="thickbox/thickbox-compressed.js" type="text/javascript"></script>
<script src="thickbox/global.js" type="text/javascript"></script>
<a href="index.php?c=index&m=pro_list&keepThis=true&TB_iframe=true&width=800&height=400" title="add a caption to title attribute / or leave blank" class="thickbox">启用相关产品</a>
下载thickbox放在网站根目录
关闭按钮与父页面赋值
父页面隐藏框<input type=hidden id="txt">
子页面
<script> | |
function closeThickbox(){ | |
var str=""; | |
for(i=0;i<document.myform.pro_id.length;i++){ | |
if(document.myform.pro_id[i].checked){ | |
str +=document.myform.pro_id[i].value+"," | |
} | |
} | |
window.parent.document.getElementById('txt').value = str; | |
self.parent.tb_remove(); | |
} | |
</script> |
<button onclick="closeThickbox();" id="closeBT" type="button" class="btn btn-primary">确定</button>