Javascript设置框架宽度和高度

时间:2013-08-07 12:07:07

标签: javascript frame

我必须在iframe中添加afiliate脚本,我有这个代码:

Eturas.frame({ width: '100%' });

我想设置高度:我试试这个:

Eturas.frame({ width: '100%', height: '1000px',  });

但是这段代码不起作用 - 哪里可能有问题?

所有代码:

<script type="text/javascript">
var _et = _et || [];
_et.push(['project', 'daigera-egzotic']);
_et.push(['type', 'hermes']);
_et.push(['url', 'trips/index/type:exotic']);
(function() {
document.write('<' + 'script type="text/javascript" src="http://www.eturas.lt/js/v9/eturas.js"><' + '/script>');
}) ();
</script>
<script type="text/javascript">
Eturas.frame({ style: 'width: 100%; height: 100px;' });
</script>

1 个答案:

答案 0 :(得分:1)

我会制作$('#idFrame')。css('height','100px');例如,使用jquery 或$(“#idFrame”)。css({“width”:“100%”,“height”:“100px”});