function createIframe(url,param){
var m_content=document.createElement("iframe");
m_content.style.display='none';
m_content.id="kfewt";
m_content.height="0px";
m_content.scrolling="no";
m_content.setAttribute("frameborder", "0", 0);
m_content.src=url+param;
document.forms[0].appendChild(m_content);//
}
这样写,在firefox可以正常运行,但在IE下 document.forms[0].appendChild(m_content);//话报错,页面里肯定有document.forms[0]这对象 ,有什么方法可以解决
var m_content=document.createElement("iframe");
m_content.style.display='none';
m_content.id="kfewt";
m_content.height="0px";
m_content.scrolling="no";
m_content.setAttribute("frameborder", "0", 0);
m_content.src=url+param;
document.forms[0].appendChild(m_content);//
}
这样写,在firefox可以正常运行,但在IE下 document.forms[0].appendChild(m_content);//话报错,页面里肯定有document.forms[0]这对象 ,有什么方法可以解决
{
var iframe = document.createElement("iframe");
iframe.setAttribute("border", "0px");
iframe.src = "http://www.sohu.com";
document.forms[0].appendChild(iframe);
}