Created
April 11, 2014 08:53
-
-
Save lxj5891/10451276 to your computer and use it in GitHub Desktop.
js脚本 OpenNew
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
OpenNew('ProductTypeOpt.aspx?operation=edit&ID=','46',380,240)