不使用ajaxpro.dll来写AJAX
RT,现在想试试不用ajaxpro.dll,代码如下:
function push()
{
document.getElementById( "Result ").value = "Transporting...... ";
var ID = document.getElementById( "ID ").value;
var URL = "/AJAX.ashx?ID= " + escape(ID);
request.open( "GET ", URL, true);
request.onreadystatechange = pop;
request.send(null);
}
function pop()
{
if (request.readyState == 4)
document.getElementById( "Result ").value = request.responseText;
}
现在的问题是:AJAX.ashx应该怎么写才能返回一个值给JS啊??
谢谢各位啦。
------解决方案--------------------reponse.write 输出来的值就是他得到的