<input type=button value="设置" onclick= document.frames("toshow").location="http://www.csdn.net">
<iframe id="toshow" src="a.jsp"></iframe>

解决方案 »

  1.   

    或者:
    <input type=button value="设置" onclick= document.frames("toshow").location.href="http://www.csdn.net">
    <iframe id="toshow" src="a.jsp"></iframe>
      

  2.   

    <body>
    <input onclick="document.all.mxh.src='http://sina.com.cn'" type=button value=change><br>
    <iframe id=mxh src="http://colorweb.go.163.com"></iframe>
      

  3.   

    仁则见人,智则风智
    1、
    <input onclick="document.all.mxh.location.replace('http://sina.com.cn')" type=button value=change><br>
    <iframe id=mxh src="http://colorweb.go.163.com"></iframe>2、
    <input onclick="document.all.rpl.innerHTML='<iframe id=mxh src=\'http://www.sina.com\'></iframe>'" type=button value=change><br>  
    <span id=rpl><iframe id=mxh src="http://colorweb.go.163.com"></iframe></span>