效果:
html:
<a href="javascript:void(0);" class="btn" onclick="javascript:openwindow('url','','800','800')">在线咨询</a>
js:
function openwindow(url,name,iWidth,iHeight){
var url;
var name;
var iWidth;
var iHeight;
var iTop=(window.screenY || window.screenTop || 0) + (screen.height - iHeight) / 2;
var iLeft=(window.screenX || window.screenLeft || 0) + (screen.width - iWidth) / 2;
window.open(url,name,'height='+iHeight+',,innerHeight='+iHeight+',width='+iWidth+',innerWidth='+iWidth+',top='+iTop+',left='+iLeft+',toolbar=no,scrollbars=auto,menubar=no,
resizeable=no,location=no,status=no')
}