1200字范文,内容丰富有趣,写作的好帮手!
1200字范文 > js当前页面打开小窗口 window.open

js当前页面打开小窗口 window.open

时间:2022-07-10 03:17:54

相关推荐

js当前页面打开小窗口 window.open

height=350 窗口高度width=480 窗口宽度scrollbars=no 不显示滚动条 resizable = no 不能调整大小 status = no 不显示状态栏 toolbar = no 不显示工具栏 menubar = no 不显示菜单栏location=no 是否显示地址栏,yes为允许;status=no 是否显示状态栏内的信息(通常是文件已经打开),yes为允许

<p class="shangqiao" style="text-align: center;margin-top:100px;">打开在线客服</p><script src="/ajax/libs/jquery/3.6.0/jquery.min.js"></script><script type="text/javascript">function openWin(url){var name; //网页名称,可为空;var iWidth=500;//弹出窗口的宽度;var iHeight=570; //弹出窗口的高度;//window.screen.height获得屏幕的高,window.screen.width获得屏幕的宽var iTop = (window.screen.height-30-iHeight)/2; //获得窗口的垂直位置;var iLeft = (window.screen.width-10-iWidth)/2; //获得窗口的水平位置;window.open(url,name,'height='+iHeight+',innerHeight='+iHeight+',width='+iWidth+',innerWidth='+iWidth+',top='+iTop+',left='+iLeft+',toolbar=no,menubar=no,scrollbars=auto,resizable=no,location=no,status=no');}$(function() {$('.shangqiao').click(function() {openWin('./666.html');});});</script>

转自:/solly793755670/article/details/79104211

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。