【问题标题】:Resizing the Window.Open inside an Anchortag在锚标记内调整 Window.Open 的大小
【发布时间】:2014-10-04 23:56:03
【问题描述】:

我是 Stackoverflow 的新手,我正在创建一个嵌套在 Anchortag 中的 Window.Open(),但是当我尝试修复 Window.Open() 的大小和控件时,我得到了一个 Error Uncaught SyntaxError: Unexpected Token }

这是我的window.Open()

infoBubble.setContent('<div style="width:250px;"><div style="float:left;"><img style="width:100px; height:100px;margin-right:10px;" alt="Logo" src="/Customer/GetLogo?cId=' + customerID + '"/></div>' + "    <b>" + Name + "</b><br>     " + Description + "<br>Distance: " + distance + " mile <br>" + '<center><a href="/Work/Worker?cusId=' + cusID + '&posId=' + posID + '&locId=' + LocID + '" onclick="window.open(this.href,toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=350,height=250);return false;"><span style="font-size: 12px !important">View Profile</span></a></center></div>');

【问题讨论】:

标签: javascript jquery html css window


【解决方案1】:

更新您的 onclick 语法,如下所示。

onclick="window.open('this.href','toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=350,height=250');return false;"

另外this.href应该替换为原始链接。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2015-01-02
    • 2020-02-20
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多