本文介绍了基于Div的弹出窗口不精打细算的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我创建了一个div标签,借助iframe,我在div标签中显示了一个Web窗体作为弹出窗口.在我的项目中,我正在使用母版页.我关闭弹出窗口时出现问题,弹出窗口未关闭.它保持原样.

我用来显示弹出窗口的代码是

函数showPopup(o,u)
{
var obj = document.getElementById(o);
如果(u)
{
obj.style.display =``块'';
window.open(u,o);
}
其他
obj.style.display =``none'';

返回false;
}

隐藏弹出窗口的代码是

函数hidePopup(p){
this.document.getElementById(p).style.display =``block'';
}

谁能告诉我如何关闭弹出窗口.

I have created a div tag and with the help of iframe i am showing a webform in the div tag as a popup. In my project i am using master pages. I have a problem when i am closing the pop up the pop up is not closing. It stays as it is.

The code which i am using to show the popup is

function showPopup(o, u)
{
var obj = document.getElementById(o);
if (u)
{
obj.style.display = ''block'';
window.open(u, o);
}
else
obj.style.display = ''none'';

return false;
}

and the code to hide the pop up is

function hidePopup(p) {
this.document.getElementById(p).style.display = ''block'';
}

can anyone tell me how i can close the popup.

推荐答案

//SETTING UP OUR POPUP
//0 means disabled; 1 means enabled;
var popupStatus = 0;
var popupName = '';

//loading popup with jQuery magic!
function loadPopup(currentpopup) {
    //loads popup only if it is disabled




这篇关于基于Div的弹出窗口不精打细算的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

11-01 22:33