首页 > web前端 > js教程 > 正文

怎样实现动态加载iframe

巴扎黑
发布: 2017-05-21 18:49:22
原创
2208 人浏览过
服务器端生成
<%
if ..... then
response.write "<iframe name=frame1 src=xxx.html width=0 height=0>"
end if
if ..... then
response.write "<iframe name=frame2 src=xxx.html width=0 height=0>"
end if
%>

客户端生成
<p id=p1></p>
<script language=vbscript>
if .... then
 str="<iframe name=frame1 src=xxx.html width=0 height=0>"
end if
if ... then
str=str&"<iframe name=frame2 src=xxx.html width=0 height=0>"
end if
生成IFRMAE
document.all("p1").innerhtml=str

给IFRAME里面的表单控件赋值。
document.all("frame1").document.all("xxx").value=xxx


提交时
document.all("frame1").form1.submit()
document.all("frame2").form1.submit()
</script>


以上方法说明了一个思路,没有经过验证,请自行验证。
登录后复制

以上是怎样实现动态加载iframe的详细内容。更多信息请关注PHP中文网其他相关文章!

相关标签:
来源:php.cn
本站声明
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn
最新问题
热门教程
更多>
最新下载
更多>
网站特效
网站源码
网站素材
前端模板
关于我们 免责声明 Sitemap
PHP中文网:公益在线PHP培训,帮助PHP学习者快速成长!