大侠们现在有js 如下 这个是是弹出wBox 的方法 并且定义了wBox 的返回值 弹出了一个DIV
<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>
现在
这个是 点击A标签后用wbox 弹出IDV 的方。我也定义了一个wBox 变量;
然后再那个弹出的DIV 里面有个确定按钮 <input type="button" id="btn1" value="确定" onclick="btQR()" />
我 就是要在点击确定的时候关闭wBox
我用 wBox.close();这个方法说他报说该对象不支持此属性和方法的错误
wbox.style.display = "none";
这个方法也不行
<script language="javascript" type="text/javascript">
function btQR() {
if (true) {
wBox.close(); //方法一 不行,他报说该对象不支持此属性和方法的错误
// var wbox = document.getElementById("wbox"); //方法2 也不行 也报错大哥们求正解和我为什么错了
// alert(wbox);
wbox.style.display = "none";
} </script>
请问如何关闭wBox 求正解
<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>
现在
这个是 点击A标签后用wbox 弹出IDV 的方。我也定义了一个wBox 变量;
然后再那个弹出的DIV 里面有个确定按钮 <input type="button" id="btn1" value="确定" onclick="btQR()" />
我 就是要在点击确定的时候关闭wBox
我用 wBox.close();这个方法说他报说该对象不支持此属性和方法的错误
wbox.style.display = "none";
这个方法也不行
<script language="javascript" type="text/javascript">
function btQR() {
if (true) {
wBox.close(); //方法一 不行,他报说该对象不支持此属性和方法的错误
// var wbox = document.getElementById("wbox"); //方法2 也不行 也报错大哥们求正解和我为什么错了
// alert(wbox);
wbox.style.display = "none";
} </script>
请问如何关闭wBox 求正解
按道理是应该这样的