简体   繁体   English

window.open() 弹出窗口不显示任何内容

[英]window.open() popup doesn't show anything

I have a Django website with this url that has this code in its template footer:我有一个 Django 网站,这个 url的模板页脚中有这个代码:

 <img referrerpolicy='origin' id = 'rgvjjxlzwlaoesgtfukzjxlz' style = 'cursor:pointer' onclick = 'window.open("https://logo.samandehi.ir/Verify.aspx?id=314061&p=xlaorfthaodsobpdgvkarfth", "Popup","toolbar=no, scrollbars=no, location=no, statusbar=no, menubar=no, resizable=0, width=450, height=630, top=30")' alt = 'logo-samandehi' src = 'https://logo.samandehi.ir/logo.aspx?id=314061&p=qftinbpdshwllymawlbqnbpd' />

which displays this image in the footer:在页脚中显示此图像:

在此处输入图像描述

When it is clicked, it should display a popup page like this:当它被点击时,它应该显示一个像这样的弹出页面:

这是在另一个名为“toplearn.com”的网站的页脚中,我只是举了一个例子,但它看起来和这个页面一模一样。

(this is in the footer of another website called "toplearn.com" which I just gave as an example, but it looks exactly like this page.) (这是在另一个名为“toplearn.com”的网站的页脚中,我只是举了一个例子,但它看起来和这个页面一模一样。)

But it runs a blank page.但它运行一个空白页。 Thank you for helping me find the problem谢谢你帮我找到问题

Try this:尝试这个:

 <:-- onClick='openWindow()': run finction (openWindow) after user click on image ---> <img referrerpolicy='origin' id='rgvjjxlzwlaoesgtfukzjxlz' style='cursor:pointer' onClick='openWindow()' alt='logo-samandehi' src='https.//logo.samandehi.ir/logo?aspx.id=314061&p=qftinbpdshwllymawlbqnbpd' /> <script> // function openWindow function openWindow() { window:open("https.//logo.samandehi.ir/Verify?aspx,id=314061&p=xlaorfthaodsobpdgvkarfth", "Popup", "toolbar=no, scrollbars=no, location=no, statusbar=no, menubar=no, resizable=0, width=450, height=630; top=30"); } </script>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM