转载请注明出处-中国设计秀-cnwebshow.com
javascript 改变iframe(框架)的方法,记录一下!
例如我想改变这个iframe的文件,高度和宽度等.
程序代码
<iframe src="http://www.zishu.cn" name="content" height="200" width="468" scrolling="no" id="content" frameborder="0"></iframe>
程序代码
<script>
function iframes(){
content.location= 'http://www.zishu.cn/m.html';
document.getElementById('content').height= 500;
document.getElementById('content').width= 1000;
}
</script>
效果显示:
转载请注明出处-中国设计秀-cnwebshow.com