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

Javascript
让innerHTML的脚本也可以运行起来
nextSibling
限制复选框的最大可选数
onpropertypchange
让焦点自动跳转
显示、隐藏密码
textarea是否自动换行
鼠标图片振动代码
对联浮动广告效果
一段实时更新的时间代码
让广告代码不再影响你的网页加载速度
载入进度条 效果
二级连动菜单
如何实现浏览器上的右键菜单
html代码调试脚本
表单提交验证类
简单实用的网页表格特效
表单的一些基本用法与技巧
Javascript - HTML的request类
教学演示-UBB,剪贴板,textRange及其他

Javascript 中的 动态加载iframe


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-09-12   浏览: 139 ::
收藏到网摘: 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>
以上方法说明了一个思路,没有经过验证,请自行验证。