开发者

How to pass 2values to window.location.href

I have a script in which I have to pass 2 values to window.location.href to open a new window which accepts these two values from the URL.

onclick="showrestdetail($urlpagename)"

The function is as follows:

function showrestdetail(urlpage)
{
    window.location.href=urlpage;
}

But I want two values to be passed 开发者_运维技巧in this function and catch thse two values when new window opens. Is there any way to do this?

Thanks in advance.


Pass your values in the query string.

http://www.domainname.com/pagetopassto.html?FirstName=Super&LastName=Man
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜