通过request.responseText得到的变量不能if(a="ab")

来源:百度知道 编辑:UC知道 时间:2024/05/17 00:44:44
jsp页面:
var a=request.responseText;
if(a=="ab") //这一句怎么不执行呢?
下面2种方法也不执行:
if(a.equals("ab"))
if(a.test("ab"))

能被接收过来的!

if("ab".equals(a)) ……
如果2种方法也不执行,我才可能是
var a=request.responseText;执行出问题了
你可以alert出a的值,看看能不能被接收过来。