var url="";//地址
var height = 500;
var width = 400;
var left = (screen.availWidth - width) / 2;
var top = (screen.availHeight - height) / 2;
if (top < 0) {
top = 0;
}
if (left < 0) {
left = 0;
}
var openWin = window.open(url, '', 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=yes,width=' + width
+ ',height=' + height + ',left=' + left + ',top=' + top);
window.onfocus = function() {//模仿模式窗口
openWin.focus();
}