0
function somefunction()
{
var xmlhttp;
if (window.XMLHttpRequest)
{// code for IE7+, Firefox, Chrome, Opera, Safari
xmlhttp=new XMLHttpRequest();
}
else
{// code for IE6, IE5
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
}
xmlhttp.onreadystatechange=function()
{
if (xmlhttp.readyState==4 && xmlhttp.status==200)
{
alert(xmlhttp.responseText.getElementById('someid').innerHTML);
}
}
xmlhttp.open("GET","1.php",true);
xmlhttp.send();
}
XMLHTTP의 응답 내가 밖으로 ID가 "someid"id를 사용하여 responsetext에서 요소를 먼저 인쇄하지 않고 가져올 수 있습니까?
이
alert(xmlhttp.responseText.getElementById('someid').innerHTML);
있지만 아무튼를 사용하여 시도에서 "100"을 얻을 필요가이
<p id="someid">100</p>
입니다 일하지 마라.
다른 방법이 있습니까? 사전에
덕분에 당신이 할 수있는 JQuery와의