2
后,我有parent.html
父页下面一样调用颜色框:jQuery的颜色框:获取参数密切颜色框
<script src="colorbox/jquery.min.js"></script>
<script src="colorbox/jquery.colorbox.js"></script>
<script>
$(document).ready(function(){
$(".example7").colorbox({
width:"60%",
height:"40%",
iframe:true
});
//How I can get Parameters from ColorBox when ColorBox closed
</script>
<body>
<p><a class='example7' href="demo_01.html">Click here to open Colorbox</a></p>
</body>
而且在demo_01.html
,我有2个图像
<html>
<script type="text/javascript">
function onChooseAndClose(val){
//how to setup to sent paramters (ID of image was chosen) to parent page before close colorbox
......
//close this Colorbox
parent.$.fn.colorbox.close()
}
</script>
<body>
<img src="imamges/img1.png" id="idImg1" onclick="javascript:onChooseAndClose('idImg1');" />
<img src="imamges/img2.png" id="idImg2" onclick="javascript:onChooseAndClose('idImg2');" />
</body>
</html>
在parent.html ,如何在ColorBox关闭时从ColorBox获取参数
谢谢。