函数之间传递参数有问题
html页面:<a href="javascript:support(<?php get_comment_info('id')?>);" >支持</a>JS文件:var xmlHttp;function support(str)
{
xmlHttp=GetXmlHttpObject()
if (xmlHttp==null)
{
alert ("Browser does not support HTTP Request")
return
}
var url="../js/support.php"
url=url+"?sid="+str
xmlHttp.onreadystatechange=stateChanged1(str)<!-- 第14行 -->
xmlHttp.open("GET",url,true)
xmlHttp.send(null)
}function stateChanged1(str)
{
var show="txtshow"+str
if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
{
document.getElementById(show).innerHTML=xmlHttp.responseText
}
}现在运行显示错误
消息: 尚未实现行: 14
字符: 2
代码: 0
URI: http://localhost/js/ReplyVote.js14行就是这个xmlHttp.onreadystatechange=stateChanged1(str)<!-- 14行 -->
参数str似乎不能传递到stateChanged1()方法中