0
html 테이블을 반환하는 ajax 요청을 수행합니다. 그 페이지로 리다이렉트 할 때 표가 제대로 표시되지만 div 요소 안에 Ajax 응답을 넣으면 표가 엉성해진다.ajax 요청에 의해 반환 된 테이블이 제대로 표시되지 않습니다.
function submitQuery() {
length = category_query.length;
if(category_query.indexOf('ALL') != -1)
category_query = category_query.substring(0,length-4);
xmlhttp.onreadystatechange=function() {
if(xmlhttp.readyState==4 && xmlhttp.status==200)
document.getElementById('resultDiv1').innerHTML = xmlhttp.responseText;
}
xmlhttp.open("GET","cons_query.php?q="+category_query,true);
xmlhttp.send();
//window.location="cons_query.php?q="+category_query;
//if i just redirect to this location, the table is displayed fine.
}
표가 아약스를 통과하는 것처럼 보이기를 원합니다.
더 쉬운 AJAX 요청을 위해 jQuery를 사용하십시오. – Hidde
표가 스타일을 가져야합니다. –
@COLDTOLD 스타일을 얻는 방법? – user1505986