0
<frameset rows="250px,*" onload="start_here();">
    <frame src="leftframe.htm" name="topo" id="topo" application="yes" />
    <frame src="leftframe.htm" name="link" id="link" />
</frameset>

这是我的 Javascript 代码

<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.5/jquery.min.js"></script>
<script language="text/javascript">
function start_here()
{
        var usernameFromCookie = GetCookie(site);
        var urlToSite = createCustomURL(usernameFromCookie);
        alert(urlToSite);
}
function createCustomURL(userName)
{
        var customURL = "http://server1/get/cgi-app.exe?HOSTID=AD&ALIAS=" + userName;
        return customURL;
}
function setUserLink(urlFromCookie)
{
        $('a#link').attr('href', urlFromCookie);
}

我正在尝试让第二个框架(名称是链接)重定向到该站点

4

1 回答 1

2

我认为您正在寻找设置框架 src。

$('#link').attr('src', urlFromCookie);
于 2012-08-01T20:10:01.410 回答