而不使用iframe进行灯箱弹出窗体



这是我的代码:

 <!DOCTYPE html>
<html>
<head>
 <script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
 <script src="http://www.jacklmoore.com/colorbox/jquery.colorbox.js" type="text/javascript" ></script>
        <link rel="stylesheet" href="http://www.jacklmoore.com/colorbox/example4/colorbox.css" type="text/css" media="screen"/>
<script type="text/javascript">
$(document).ready(function () {
    $("#test").click(function () { //on clicking the link above
        $(this).colorbox({iframe:true, width:"80%", height:"100%",scrolling:false});
    });
});
</script>
</head>
<body>
<h3>External Form</h3>
<a href="https://ss88.wufoo.com/forms/rmndx1a0zzpe4m/" id="test">Please fill out my form.</a>
</body>
</html>

现在这很好,我可以知道,如何在不使用iframe的情况下为相同的输出运行这段代码吗?

提前感谢!!。。

/ Using a selector:
$("#inline").colorbox({inline:true, href:"#myForm"});
// Using a jQuery object:
var $form = $("#myForm");
$("#inline").colorbox({inline:true, href:$form});

或者只是把iframe设为false。

详细信息见他们的网站。Colorbox.js

最新更新