用document.frames("id1").src设置iframe的属性,使其显示内容改变。无效。
请问,除了用link、form的提交方式,有别的办法改变iframe的内容吗?我的JS写法有错误吗?
谢谢。
---------------------------------------------------------------
仁则见人,智则风智
1、
1<input onclick="document.all.mxh.location.replace('http://sina.com.cn')" type="button" value="change"/>
1<br/>
1<iframe id="mxh" src="http://colorweb.go.163.com"></iframe>
2、
1<input onclick="document.all.rpl.innerHTML='<iframe id=mxh src=\'http://www.sina.com\'></iframe>'" type="button" value="change"/>
1<br/>
1<span id="rpl"><iframe id="mxh" src="http://colorweb.go.163.com"></iframe></span>