将参数传递给window.open

时间:2010-09-20 06:20:48

标签: php

当我调用window.open方法时,如何传递不同的值。值是表单值。

1 个答案:

答案 0 :(得分:1)

我假设您希望将值输出到JavaScript函数window.open。你可以回显一下window.open和标签之间的各种选项。像这样:

// untested code
$options = "width=$width,height=$height";
$url="www.google.com";

// assuming you have echoed out the JavaScript language tags
echo "window.open('$url', '$options');";
相关问题