在 div 窗口内添加链接
如何在“弹出”窗口中添加链接。当我使用 href 时,它会使整个 div 消失。这是代码。谢谢。
<div class="listing" style="display:none" id="open_window2_codediv">
<xmp id="open_window2" class="listing" >
var win = new Window({className: "dialog", width:500, height:400, zIndex: 100, resizable:
true, title: "Main Menu", showEffect:Effect.BlindDown, hideEffect: Effect.SwitchOff, draggable:true, wiredDrag: true})
win.getContent().innerHTML= "<div style='padding:10px'> LINK HERE!!!!!</div>"
win.setStatusBar("Menu bar info");
win.showCenter();
<xmp>
<div>
How can I add a link inside a "popup" window. When I use href it makes the entire div dissapear. Here is the code. Thanks.
<div class="listing" style="display:none" id="open_window2_codediv">
<xmp id="open_window2" class="listing" >
var win = new Window({className: "dialog", width:500, height:400, zIndex: 100, resizable:
true, title: "Main Menu", showEffect:Effect.BlindDown, hideEffect: Effect.SwitchOff, draggable:true, wiredDrag: true})
win.getContent().innerHTML= "<div style='padding:10px'> LINK HERE!!!!!</div>"
win.setStatusBar("Menu bar info");
win.showCenter();
<xmp>
<div>
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我认为您正在寻找
window.open
话虽如此,这
可能是一个非常非常糟糕的主意。window.open
应该使用 url。您应该将希望弹出窗口包含的 html 放入单独的 html 文件中,然后调用MDN 页面列出了该函数接受的所有选项。
I think you're looking for
window.open
Having said that, this is
probablya very, very bad idea.window.open
is supposed to work with a url. You should put the html you want your popup window to contain into a separate html file, then callThe MDN Page lists all of the options that this function accepts.