方法:

1 function openWin(u, w, h) {
2     var l = (screen.width - w) / 2;
3     var t = (screen.height - h) / 2;
4     var s = 'width=' + w + ', height=' + h + ', top=' + t + ', left=' + l;
5     s += ', toolbar=no, scrollbars=no, menubar=no, location=no, resizable=no';
6     open(u, 'oWin', s);
7 } 

 

示例:

<a href="javascript:void(openWin('http://www.baidu.com/', 600, 500));">Test</a>

 

 

来源:http://blog.csdn.net/liguohuaty/article/details/3467069

相关文章:

  • 2022-01-11
  • 2021-06-03
  • 2022-12-23
  • 2021-08-22
  • 2022-12-23
  • 2021-10-31
  • 2021-06-27
  • 2021-11-15
猜你喜欢
  • 2021-08-21
  • 2022-12-23
  • 2022-03-03
  • 2022-12-23
  • 2021-08-31
  • 2022-12-23
相关资源
相似解决方案