【发布时间】:2010-06-17 22:01:10
【问题描述】:
我有这个代码。
xmlhttp.open("GET","getuser.php?q="+str,true);
where q="+str
我想传递第二个 var 我该怎么做?
【问题讨论】:
-
我不知道那是什么意思。
标签: ajax variables get xmlhttprequest
我有这个代码。
xmlhttp.open("GET","getuser.php?q="+str,true);
where q="+str
我想传递第二个 var 我该怎么做?
【问题讨论】:
标签: ajax variables get xmlhttprequest
xmlhttp.open("GET","getuser.php?q=" + q + "&r=" + r, true);
请注意,如果参数包含特殊字符,这将无法正确转义您的参数。您可能想改用encodeURIComponent(q) 之类的东西。
【讨论】:
追加+ "&anotherVar=" + anotherString。
【讨论】: