如何关闭弹出DIV 的wbox
div中确定的点击事件{
if(true)
{
   //这里要写 关闭wbox的代码
请问怎么关闭
}
}各位大侠求救··

解决方案 »

  1.   

    var wBox = $('#你的id').wBox({   //定义的弹出的时候返回个值
    wBox.close() 关闭
      

  2.   


    var wbox = document.getElementById("wbox");
    if(true){
        wbox.style.display="none";//display=""是显示,display="none"是不显示
    }
      

  3.   

    你们的方法在我这里怎么不行了啊,大哥们是情况是这样的
      <script language="javascript" type="text/javascript">
            function showbox(str, str1) {
                $("#hid").val(str);
                var wBox = $('.aaa').wBox({
                    target: "#cccc",
                    title: "请完善允收意见",
                    callBack: function () {
                        if (str1 == "0") {
                            $("#wBox #ra1").attr("checked", "checked");
                            $("#wBox #radio1").attr("disabled", "disabled");
                        } else {
                            $("#wBox #radio1").attr("checked", "checked");
                            $("#wBox #ra1").attr("disabled", "disabled");
                        }
                    }
                });        }
        </script>
    (这个方法在form 外面)
    这个是 点击A标签后用wbox 弹出IDV 的方。我也定义了一个wBox 变量;
    然后再拿个弹出的DIV 里面有个确定按钮  <input type="button" id="btn1" value="确定" onclick="btQR()" />
    我 就是要在点击确定的时候关闭wBox
        <script language="javascript" type="text/javascript">
            function btQR() {
                   if (true) {
                        wBox.close(); //方法一 不行,他报说该对象不支持此属性和方法的错误
                    //  var wbox = document.getElementById("wbox"); //方法2  也不行 也报错大哥们求正解和我为什么错了
                    //    alert(wbox);
                        wbox.style.display = "none";                    //  $("." + result).remover();
                
            }    </script>