index.html中有个iframe,默认src为main.html,我通过js将src改为including.html,想在同一个function中对including中的iframe进行修改,该怎么做啊?
代码如下:
-----------------------------------------
index.html
<body>
<a href="javascript:void(0);" click="inc('调用的页面.html')"></a>
<iframe id="ifm" name="ifm" src="main.html"></iframe>
</body>
<script>
function inc(dz){
$("#ifm").attr("src","including.html");
ifm.tiao(dz)
}
</script>
------------------------------------------
including.html
<body>
<iframe id="incifm" name="incifm" src=""></iframe>
</body>
<script>
function tiao(dz){
$("#incifm").css("margin-top","-195px");
$("#incifm").css("height","665px");
}
</script>