JS 给iframe定样式,请高手进?

vartempIFrame=document.createElement('iframe');tempIFrame.setAttribute('id','frame'+s... var tempIFrame=document.createElement('iframe');
tempIFrame.setAttribute('id','frame'+sId);
tempIFrame.setAttribute('src',sUrl);
tempIFrame.style.border='0';
tempIFrame.style.width='100%';
tempIFrame.style.height='100%';
tempIFrame.style.marginHeight='0';
tempIFrame.style.marginWidth='0';
tempIFrame.style.frameBorder='0';
tempIFrame.style.scrolling='yes';
tempIFrame.style.framespacing='0';
tempDIV.appendChild(tempIFrame);
请问一下,为什么我这样子做,没效果,请问一下,那该如何改?
展开
 我来答
3tion
2007-07-11 · TA获得超过175个赞
知道小有建树答主
回答量:121
采纳率:0%
帮助的人:204万
展开全部
你有几个属性根本就不是样式里面的。直接就是frame的属性。
templFrame.frameBorder = '0';
templFrame.scrolling = 'yes';
templFrame.framespacing = '0';
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式