<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=big5">
<title>获取iframe框架中src所指向的文件的內容</title>
</head>
<script language=javascript>
function ini(){
alert(document.getElementById("frame_id").contentWindow.document.body.innerHTML)
}
</script>
<body onload="ini()">
<iframe id=frame_id src="test.asp"></iframe>
</body>
</html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=big5">
<title>获取iframe框架中src所指向的文件的內容</title>
</head>
<script language=javascript>
function ini(){
alert(document.getElementById("frame_id").contentWindow.document.body.innerHTML)
}
</script>
<body onload="ini()">
<iframe id=frame_id src="test.asp"></iframe>
</body>
</html>