1. 弹出窗口:
如下代码在IE6SP1,GOOGLE工具条(开启拦截弹出窗口),测试通过
default.htm
以下是代码片段:
var test = window.showModalDialog(’openwindow.htm’,’OpenWindow’,’’);
window.opener = null;
window.close();
openwindow.htm
function openFullScreen(){
window.open("default1.htm","ful
l","fullscreen");//Default1.htm文件为你要弹出的窗口文件
window.returnValue = "TEST";
window.close();
}
openFullScreen();
----------------------------------------
2. 查API挺方便的网站:http://www.gotapi.com/
----------------------------------------
补充:showdialog传值~
主页面中:
…………………………
<form name="printTextForm" jwcid="printTextForm">
<tr>
<td colspan="2" align="center"><input name="PrintText2" jwcid="printtext" onClick=NewWindow()/></td>
<td colspan="2"><input id="PagePrompt" jwcid="pageprompt"/></td>
</tr>
</form>
…………………………
function NewWindow()
{
var obj = new Object();
obj.headpage = newAccountForm.HeadPageText.value;
obj.text = newAccountForm.TranxDataText.value.substr(3);
window.showModalDialog("printheadpage.html",obj,"dialogWidth=400px;dialogHeight=200px");
}
…………………………
在打开的printheadpage.html中,用脚本语言
var obj = window.dialogArguments;
KdbKbdControl1.cPrintText = obj.text;
s = obj.headpage;
……………………………………
就取得了传递的对象