<script> <BR>function show_child() <BR>{ <BR>var child=window .open("child.html","child","height=200,width=400,status=yes,toolbar=no,menubar=no,location=no"); <BR>/* if(!child.closed) <BR>{ <BR>if(!window .close()) <BR>{ <BR>var textValue = frm.txt.value; parent.frm0.txt0.value = textValue; <BR>} <BR>else <BR>{ <BR>window .close(); <BR>child.close(); <BR>} <BR>}*/ <BR>} <BR></script>
打开子窗口
小结:一般情况下,windows.open因为自定义的比较多,所以用windows.open的较多,上面的很多网页编辑器喜欢用showModalDialog,实在不知道用哪个的的,就用window.open吧,很多成熟的cms系统都是用的window.open.