Skip to content

Instantly share code, notes, and snippets.

@lxj5891
Created April 11, 2014 08:53
Show Gist options
  • Save lxj5891/10451276 to your computer and use it in GitHub Desktop.
Save lxj5891/10451276 to your computer and use it in GitHub Desktop.
js脚本 OpenNew
function OpenNew(acVal, idVal, WindowWidth, WindowHeight) {
var windowW = WindowWidth;
var windowH = WindowHeight;
var windowX = Math.ceil((window.screen.width - windowW) / 2);
var windowY = Math.ceil((window.screen.height - windowH) / 2);
var s = new String(acVal);
if (s.lastIndexOf('=') != (s.length - 1)) {
s += '=';
}
s += new String(idVal);
window.open(s, '', 'toolbar=no,location=no,menubar=no,scrollbars=yes,resizable=yes,width=' + windowW + ',height=' + windowH + ',left=' + windowX + ',top=' + windowY);
return true;
}
@lxj5891
Copy link
Author

lxj5891 commented Apr 11, 2014

OpenNew('ProductTypeOpt.aspx?operation=edit&ID=','46',380,240)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment