间歇执行百度的搜索,JS第一次执行正常,第2次弹出脚本错误,没有权限,查资料,只找到了说是跨域问题,那为什么第一次可以执行呢?
希望高手能帮忙解决这个问题,分不多,谢谢!<body>
<table width="100%" height="39" border="0" cellpadding="0" cellspacing="0" bgcolor="#DCE3E7">
<tr>
<td ><span class="STYLE1">自动搜索</span></td>
</tr>
</table>
<iframe name="seo_iframe" id="seo_iframe" src="maininfo.aspx" height="400px" width="100%" frameborder="0"></iframe>
<script>
function seo()
{
var url="http://www.baidu.com/s?wd=%B8%DF%B9%E2%C4%A3%BE%DF%20%D2%D7%CD%D8%C2%F5%BF%CB&rsp=1&oq=%B8%DF%B9%E2%C4%A3%BE%DF&f=1"; document.seo_iframe.location.href=url;
}
window.setInterval("seo()", 5000);
</script>
</body>
希望高手能帮忙解决这个问题,分不多,谢谢!<body>
<table width="100%" height="39" border="0" cellpadding="0" cellspacing="0" bgcolor="#DCE3E7">
<tr>
<td ><span class="STYLE1">自动搜索</span></td>
</tr>
</table>
<iframe name="seo_iframe" id="seo_iframe" src="maininfo.aspx" height="400px" width="100%" frameborder="0"></iframe>
<script>
function seo()
{
var url="http://www.baidu.com/s?wd=%B8%DF%B9%E2%C4%A3%BE%DF%20%D2%D7%CD%D8%C2%F5%BF%CB&rsp=1&oq=%B8%DF%B9%E2%C4%A3%BE%DF&f=1"; document.seo_iframe.location.href=url;
}
window.setInterval("seo()", 5000);
</script>
</body>
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货