如何将.aa用JS插入到.bb里,说明{bb不能加“id”因为id已经被别的程序占了。只能用class名了。}为什么不直接HTML写进去,因为中间隔着N个DIV,所以想用JS实现将aa插入到bb里。
<style>
.aa{width:100px;height:100px;background-color:#eeeeee;position:relative; z-index: 1; }
.bb{width:200px;height:200px;background-color: #FF0000;padding:30px;}
</style>
<div class="aa"></div>
<embed class="bb" src="helloworld.swf" />
想JS实现出来的效果就相当于这样的。
<embed class="bb" src="helloworld.swf" />
<div class="aa"></div>
</embed>