【发布时间】:2012-07-21 19:17:36
【问题描述】:
快速提问,为什么这不起作用?
if ( xmlhttp.responseText )
{
location.href = "result.php"
document.getElementById( 'page-result' ).innerHTML = xmlhttp.responseText;
}
我想要做的是将搜索结果放在另一个页面上的 div 上。
【问题讨论】:
-
正如 Juhana 所说,这不是 jQuery。这是标准的 JavaScript。如果你想要 jQuery ajax:api.jquery.com/jQuery.ajax