>  기사  >  웹 프론트엔드  >  动态加载iframe_JavaScript

动态加载iframe_JavaScript

WBOY
WBOY원래의
2016-05-16 19:29:171068검색
服务器端生成
"
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>


以上方法说明了一个思路,没有经过验证,请自行验证。
</iframe>
성명:
본 글의 내용은 네티즌들의 자발적인 기여로 작성되었으며, 저작권은 원저작자에게 있습니다. 본 사이트는 이에 상응하는 법적 책임을 지지 않습니다. 표절이나 침해가 의심되는 콘텐츠를 발견한 경우 admin@php.cn으로 문의하세요.