请大家运行这段代码就知道了
<body>
<script language="javascript">
for (var i=0;i<10;i++)
{
var IFRAME = document.createElement('IFRAME');
IFRAME.id = "IFRAME" + i; //myid是一个变量
var st = IFRAME.style;
st.position = 'absolute';
st.left = 0 + 'px';
st.top = 0 + 'px';
st.width = 90 + 'px';
st.height = 10 + 'px';
st.zIndex = 100;
st.backgroundColor = "red";
st.display="none";
st.marginTop=0;  //我想实现marginheight="0" marginwidth="0"不知道怎么写?
st.marginRight=0;
st.marginBottom=0;
st.marginLeft=0;
st.border=0; //我想实现frameborder="0" 不知道这么写对不对? document.body.insertAdjacentElement('beforeend',IFRAME);
var docu = window.frames["IFRAME" + i].document;
docu.write(i);
};
</script>
</body>