日期:2014-05-16  浏览次数:20586 次

ajax传值到textbox的小问题
JScript code
function ajxstatechange(id) {
       if (http_request.readyState == 4) {
              if (http_request.status == 200) {
                   //alert(http_request.responseText);
                   document.getElementById(id).innerHTML=unescape(http_request.responseText);
              } else {
                   //document.write(http_request.responseText);
                   alert('URL error'+http_request.responseText);
              }
       }
}


<span id="id"></span>
如果是传到<input name="a" type="hidden" id="a">怎么做,指点一下

------解决方案--------------------
document.getElementById('a').value = unescape(http_request.responseText);