Home >Web Front-end >JS Tutorial >jquery plug-in jbox uses iframe to close the problem_jquery
This button calls the close method to close the pop-up window. There is no way to close it, because the close method requires a parameter. The parameter should be the iframe, but passing it in does not take effect. I don’t know why I can’t find a solution when searching online. .
In the end, I had to change the source code myself and add the following code to the first sentence of its close method:
if(box==undefined){
box=jBox.boxes[0];
}
Then use: window.parent.window.jBox.close(); to call this method.