我正在加载对 div 的 ajax 响应,但现在我想将它加载到中间 iframe 我尝试了以下操作,但它从来没有工作!你们能告诉我我做错了什么吗?谢谢
<script type="text/javascript">// <![CDATA[
$(document).ready(function() {
$.ajaxSetup({ cache: false });
setInterval(function() {
//$('#divToRefresh').load('./doit.php');
$("#iframe").attr('blank.php','./doit.php'); //change url
}, 20000);
});
// ]]></script>
<iframe name="top" src="blank.php" id="top" scrolling="no" noresize frameborder="0" marginwidth="0" marginheight="0" width="100%" height="79"></iframe>
<iframe NAME="middle" src="blank.php" id="middle" noresize frameborder="0" marginwidth="0" marginheight="0" width="100%" height="238" scrolling="auto"></iframe>
<iframe NAME="foot" src="blank.php" id="foot" scrolling="no" noresize frameborder="0" marginwidth="0" marginheight="0" width="100%" height="200"></iframe>
<div id="divToRefresh">Loading ...</div>