0
我做了一個返回html表格的ajax請求。當我只是做一個位置重定向到該頁面時,表格顯示正確,但是當我將ajax響應放入div元素中時,表格變形。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更容易的AJAX請求。 – Hidde 2012-07-06 07:09:37
確保表格獲得樣式 – 2012-07-06 07:09:39
@COLDTOLD如何獲得其樣式? – user1505986 2012-07-06 07:18:01