用于打开许多弹出窗口的javascript [英] javascript for open many popup window

查看:48
本文介绍了用于打开许多弹出窗口的javascript的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

i am using javascript for open new windows in browser,it's successfuuly executed.but now i want same page in different popup windows,Advance thanks<pre lang="Javascript">function openph(lmg)
{
//debugger;


var url1 = "PriceListDtl.aspx?ResponseType=Edit&parentID&ID=" + lmg   ;

var newin = window.open( url1 , "test","top=0,left=0,menubar=no,toolbar=no,location=no, resizable=no,height=550,width=600,status=no,scrollbars=no,minimizable=no,maxmizable=no,resizable=0,titlebar=no;");
if ( newin .focus ())
{
 
newin .focus()
}
}

推荐答案

以另一个名称(仅检查名称test1& test2& test3在代码中)
Call the window with another name, that''s all.(Check the names test1 & test2 & test3 in the code)
<html>
<head>
<script type="text/javascript">
function open_win()
{
window.open("http://www.microsoft.com/","test1");
window.open("http://www.microsoft.com/","test2");
window.open("http://www.microsoft.com/","test3");
}
</script>
</head>
<body>
<form>
<input type="button" value="Open Windows" onclick="open_win()">
</form>
</body>
</html>


现在,此脚本将在同一页面上打开3次&根据您的需要进行更改.诀窍是您需要动态更改name才能打开多个窗口


Now this script will open the same page 3 times & do changes based on your need. The trick is you need to change the name dynamically to open multiple windows


这篇关于用于打开许多弹出窗口的javascript的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆