var MemberList=showModalDialog("http://localhost/compub/client/getMember.htm","","status=no;center=yes;help=no;dialogWidth=340px;dialogHeight=220px;scroll=no;resize=no");
if(typeof(MemberList)!=="undefined"){alert(MemberList.toString());}else{alert(MemberList)};没有值返回时 就是undefined
所以你需要先判断它的类型
if(typeof(MemberList)!=="undefined"){alert(MemberList.toString());}else{alert(MemberList)};没有值返回时 就是undefined
所以你需要先判断它的类型
比如
http://www.aaa.com/pl.aspaaa 站点 新建网页 redirect.htm
<HTML>
<META http-equiv="Content-type" content="text/html;charset=gb2312"><SCRIPT language="javascript">
<!--
function funLoad()
{
var oFormObj = window.dialogArguments;
dialog.location.href = oFormObj;
}
// -->
</SCRIPT>
<FRAMESET border="2" framespacing="1" frameborder="1" onLoad="funLoad()" cols="*">
<FRAME src="" name="dialog" scrolling="auto" marginwidth="10" target="dialog">
</FRAMESET>
</HTML>然后在http://www.aaa.com/pl.asp中这样用
<script language="javascript">
<!--http://www.bbb.com/page1.jsp
var MemberList=window.showModalDialog("redirect.htm","http://www.bbb.com/page1.jsp","help=no;dialogWidth=340px;dialogHeight=220px;");
if(typeof(MemberList)!=="undefined"){alert(MemberList.toString());}else{alert(MemberList)};
//-->
</script>就可以了~
出现那种情况,那就是B机的IE有问题!