如何在javascript中传递参数';谁的网址?
我有一个javascript函数,可以在单击链接时打开新窗口,但我想将值“id”传递到另一个页面。如何将该值添加到url> 下面是代码如何在javascript中传递参数';谁的网址?,javascript,Javascript,我有一个javascript函数,可以在单击链接时打开新窗口,但我想将值“id”传递到另一个页面。如何将该值添加到url> 下面是代码 <SCRIPT language="JavaScript1.2"> function openoldgurantorwindow() { window.open("enter code heregurrantor/old", "mywindow","location=1,status=1,scrollbars=
<SCRIPT language="JavaScript1.2">
function openoldgurantorwindow()
{
window.open("enter code heregurrantor/old",
"mywindow","location=1,status=1,scrollbars=1,width=700,height=700");
}
</SCRIPT>
<a href="javascript: openoldgurantorwindow()">Click to view old Guarantors</a>
函数openoldgurantorwindow()
{
window.open(“在此处输入代码gurrantor/old”,
“我的窗口”,“位置=1,状态=1,滚动条=1,宽度=700,高度=700”);
}
提前谢谢。您可以传递
id
或任何其他参数作为查询参数,如下所示:
function openoldgurantorwindow(id) {
window.open("http://example.com?id=" + id,
"mywindow", "location=1,status=1,scrollbars=1,width=700,height=700");
}
并且可以在下一页的
PHP
code中的$\u GET
变量中检索。那么值id
在哪里呢。你从哪里买的?PHP还是javascript??