<iframe src="" id="T1"></iframe>
<script type="text/javascript">
var c = document.getElementById("T1");
c.onreadystatechange = function(){
alert(this.readyState);
}
</script>
<input type="button" value="sohu" onclick="c.src='http://www.sohu.com'"/>
<input type="button" value="163" onclick="c.src='http://www.163.com'"/>
<script type="text/javascript">
var c = document.getElementById("T1");
c.onreadystatechange = function(){
alert(this.readyState);
}
</script>
<input type="button" value="sohu" onclick="c.src='http://www.sohu.com'"/>
<input type="button" value="163" onclick="c.src='http://www.163.com'"/>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=GBK">
<title>iframe</title>
<script type="text/javascript">
function loadWin(){alert("AAA");}
window.onload=loadWin;
</script>
</head>
<body style="margin:0 0 0 0;">
<iframe src="" id="f1" style="margin:0 0 0 0;" onload="loadWin()"></iframe>
</body>
</html>