当前位置: 首页 > 图文教程 > 网络编程 > Javascript > 动态加载iframe

Javascript
各种浏览器兼容问题
取得父标签
JS用 或 || 来兼容FireFox!
JavaScript的Function详细
关于IE只能嵌套27层表格的说法证明
xmlHTTP返回值重编码的优化
静态网页加密
来访统计
炽热的文字
发一个分页的js
琥珀无限级联动菜单-JavaScript版
用javascript连接access数据库的方法
用js得到网页中所有的div的id
cloneNode实现表格增加删除效果
支持IE和FF的div+css选项卡
arguments对象
使两个iframe的高度与内容自适应,且相等
云网广告中的代码,提示出错,大家找找
document.all与WEB标准
表单内同名元素的控制

Javascript 中的 动态加载iframe


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-09-12   浏览: 182 ::
收藏到网摘: n/a

服务器端生成
<%
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
%>
客户端生成
<div id=div1></div>
<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("div1").innerhtml=str
给IFRAME里面的表单控件赋值。
document.all("frame1").document.all("xxx").value=xxx
提交时
document.all("frame1").form1.submit()
document.all("frame2").form1.submit()
</script>
以上方法说明了一个思路,没有经过验证,请自行验证。