我希望把main.jsp中的值如下得到?
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>
<body>
Main window
</body>
</html>

解决方案 »

  1.   

    window.parent.Frame_main得到的是FrameSet中的文档对象中的元素.
      

  2.   

    try:window.parent.frame_main.innerhtml
      

  3.   

    下面那样:
    <script language="javascript">
    document.write ('<iframe src="aa.asp" id="message" width="575" height="350"></iframe>')
    frames.message.document.designMode = "On";
    </script>
    <input id=Submit1  onClick="document.form1.n_content.value = frames.message.document.body.innerHTML;" type=submit name=Submit1 value="获得frame中的内容">