如何使用经典的asp通过链接将从jquery / javascript检索到的值传递给子窗口

时间:2015-11-01 10:06:01

标签: javascript jquery asp-classic

我想通过点击链接打开子窗口(popup_postenq.asp),通过get方法将父页面的完整URL传递给子窗口。

请帮我解决这个问题。我的代码如下:

<script type="text/javascript">
 var popup;
function ShowPopup(url) {
    if(popup)
    {
     popup.close();
    }
    popup = window.open(url, "self", "toolbar=no,scrollbars=yes,location=no,statusbar=no,menubar=no,resizable=0,width=300,height=350,left = 0,top = 0");
        popup.focus();
  }
</script>

<%
dim urlloc
urlloc = "<p id='demo'></p>"
%>

<span style="color: #1686CC;"><a href="" onclick="ShowPopup('popup_postenq.asp?hh=<%=urlloc%>'); return false;" style="color: #1686CC;">send enquiry</a></span>

<script>
document.getElementById("demo").innerHTML = 
window.location.href;
</script>

0 个答案:

没有答案