【发布时间】:2014-03-12 04:53:10
【问题描述】:
单击按钮时,我使用 window.open() 生成一个弹出窗口。
产生弹窗的点击按钮在social.html中
我的代码是,
$.get(url).success(function(req)
{
var win=window.open('','_blank','width=700,height=500,top=0,left(screen.width-700)');
win.document.write('<link rel="stylesheet" href="/css/mycss.css" />' + req);
win.document.close();
});
正在将 ajax 调用响应(包含 html 代码)写入弹出窗口。 弹出窗口内的内容有许多外部链接,它们在不同的窗口中打开(再次使用 window.open)并正常工作。问题是, 当我单击任何链接时,弹出窗口重定向到 social.html。它不应该重定向
请帮助我尝试但无法获得解决方案。
【问题讨论】:
标签: javascript jquery html popup