用脚本打开一个新窗口

方法一:
showModalDialog("notice.tip.do",'notice',"dialogWidth:30;dialogHeight:20;center:1");
方法二:
function popup_win(str)
{
alert("ok");
win=opennew("about:blank","popup_win",300,200,1)
win.document.open();
  win.document.write("<title>佣金规则脚本</title>");
win.document.write("<body bgcolor='#E3E6EA'>");

win.document.write("<fieldset style='width:95%;height:95%'><legend><strong  >佣金规则脚本</strong></legend>");
  
win.document.write("<pre>");
str=str.replace(/htmlbr/g,'<br>');
win.document.write(str);
win.document.write("</pre>");
  
win.document.write("</fieldset>");
win.document.write("</body>");
win.document.close();
}

方法三:
var page="agentinformation.office.edit.ipcode.add.do?office_id="+form1.office_id.value+"&office_name="+form1.office_name.value+"&type=sel&area_lvl_code="+areaCode;

newwin=window.open(page,'',"resizable=yes,status=no,scrollbars=no,width=600,height=350,left="+(window.screen.width-600)/2+",top="+(window.screen.height-350)/2);
newwin.focus();
跳转到指定页面后,返回原来页面则:
window.close();
window.opener.location.reload();

你可能感兴趣的:(脚本,Office)