1. Jsp writing in iframe
<input type="button" value="aaaa" onclick="test123();" />
<script type="text/javascript">
function test123(){
alert('iframe页面');
var js= document.createElement("script");
js.type="text/javascript";
js.src = "http://ip1:port1/uias/uias/login/login1.js";
document.getElementsByTagName("head")[0].appendChild(js);
}
2. Writing in the parent class
<iframe id="pframe" style="width:800px; height:200px; border: 1px solid red;"
src="http://ip2:port2/uiasmag/uias21/uiasLogin/loginMagPassword.jsp"></iframe>
</div>
3. Parent class login1.js
alert('iframe parent page method');