< script language = " javascript " > function deleteobject(id) ... { if (window.XMLHttpRequest)...{ xmlhttp = new XMLHttpRequest(); }else...{ xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); } xmlhttp.onreadystatechange = processStateChange; xmlhttp.open("GET", "deltest.asp?random="+Math.random()+"&id="+id, false); xmlhttp.send(null); function processStateChange()...{ if (xmlhttp.readyState == 4)...{ if (xmlhttp.status == 200)...{ if(xmlhttp.responseText=="ok")...{ var aDel = document.getElementById("del"+id); while("tr" != aDel.nodeName.toLowerCase()) ...{ aDel = aDel.parentNode; } aDel.parentNode.removeChild(aDel); alert("删除成功"); }else...{ alert("删除失败"); } }else...{ document.getElementById("getvalue").innerHTML=xmlhttp.statusText; } } }} </ script >