注:
//关闭,父窗口弹出对话框,子窗口直接关闭
this.Response.Write("<script language=javascript>window.close();</script>");

//关闭,父窗口和子窗口都不弹出对话框,直接关闭
this.Response.Write("<script>");
this.Response.Write("{top.opener =null;top.close();}");
this.Response.Write("</script>");

//弹出窗口刷新当前页面width=200 height=200菜单。菜单栏,工具条,地址栏,状态栏全没有
this.Response.Write("<script language=javascript>window.open('rows.aspx','newwindow','width=200,height=200')</script>");

//弹出窗口刷新当前页面
this.Response.Write("<script language=javascript>window.open('rows.aspx')</script>");
this.Response.Write("<script>window.open('WebForm2.aspx','_blank');</script>");

//弹出提示窗口跳到webform2.aspx页(在一个IE窗口中)
this.Response.Write(" <script language=javascript>alert('注册成功');window.window.location.href='WebForm2.aspx';</script> ");

//关闭当前子窗口,刷新父窗口
this.Response.Write("<script>window.opener.location.href=window.opener.location.href;window.close();</script>");
this.Response.Write("<script>window.opener.location.replace(window.opener.document.referrer);window.close();</script>");

//子窗口刷新父窗口
this.Response.Write("<script>window.opener.location.href=window.opener.location.href;</script>");
this.Response.Write("<script>window.opener.location.href='WebForm1.aspx';</script>");

//弹出提示窗口.确定后弹出子窗口(WebForm2.aspx)
this.Response.Write("<script language='javascript'>alert('发表成功!');window.open('WebForm2.aspx')</script>");

//弹出提示窗口,确定后,刷新父窗口
this.Response.Write("<script>alert('发表成功!');window.opener.location.href=window.opener.location.href;</script>");

//弹出相同的一页
<INPUT type="button" value="Button" οnclick="javascript:window.open(window.location.href)">

//
Response.Write("parent.mainFrameBottom.location.href='yourwebform.aspx?temp=" +str+"';");

<SCRIPT LANGUAGE="javascript"> 
<!-- 
window.open ('page.html', 'newwindow', 'height=100, width=400, top=0, left=0, toolbar=no, menubar=no, scrollbars=no, resizable=no,location=n o, status=no') //这句要写成一行
--> 
</SCRIPT>  
  
  参数解释: 
  
  <SCRIPT LANGUAGE="javascript"> js脚本开始; 
  window.open 弹出新窗口的命令; 
  'page.html' 弹出窗口的文件名; 
  'newwindow' 弹出窗口的名字(不是文件名),非必须,可用空''代替; 
  height=100 窗口高度; 
  width=400 窗口宽度; 
  top=0 窗口距离屏幕上方的象素值; 
  left=0 窗口距离屏幕左侧的象素值; 
  toolbar=no 是否显示工具栏,yes为显示; 
  menubar,scrollbars 表示菜单栏和滚动栏。 
  resizable=no 是否允许改变窗口大小,yes为允许; 
  location=no 是否显示地址栏,yes为允许; 
  status=no 是否显示状态栏内的信息(通常是文件已经打开),yes为允许; 
  </SCRIPT> js脚本结束

'newwin':隐藏菜单栏地址栏工具条
width=50:宽度
height=50:高度
scrollbars=yes/n滚动条
top=50:窗口距离屏幕上方
left=50:窗口距离屏幕左侧
例:window.open('detail.aspx?ID="+e.Item.Cells[1].Text+"','newwin','width=750,height=600,scrollbars=yes,top=50,left=50');"); 
this.Response.Write("<Script>window.open('WebForm2.aspx','','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes,width=750,height=470,left=80,top=40');</script>");

例:
this.Response.Write("<script>alert('发表成功!');window.opener.location.href=window.opener.location.href;</script>");
this.Response.Write("<script>");
this.Response.Write("{top.opener =null;top.close();}");
this.Response.Write("</script>");

例: linkcolumn1.DataNavigateUrlFormatString="javascript:varwin=window.open('edit_usr.aspx?actid={0}','newwin','width=750,height=600,scrollbars=yes,top=50,left=50');window.close()";

javascript弹出窗口总结相关推荐

  1. javascript弹出窗口居中代码

    javascript弹出窗口代码 下面给两个弹出屏幕居中窗口的例子 window.open()方式 function ShowDialog(url) { var iWidth=300; //窗口宽度 ...

  2. javascript弹出窗口代码大全(转)

    转帖,用来学习的 javascript弹出窗口代码大全 如何利用网页弹出各种形式的窗口,我想大家大多都是知道些的,但那种多种多样的弹出式窗口是怎么搞出来的,我们今天就来学习一下: 1.弹启一个全屏窗口 ...

  3. html运用javascript设计弹窗,javascript弹出窗口实现代码

    很多网页都实现了弹出窗口,使用方面,特别的人性化,本文就大家介绍javascript实现弹出窗口特效,具体代码如下: 弹出窗口 *{ margin: 0; padding: 0; } div{ mar ...

  4. JavaScript 弹出窗口总结

    1: window.open <!-- window.open('page.html', 'newwindow', 'height=100, width=400, top=0,left=0, t ...

  5. php弹出窗口带确定按钮,javascript弹出窗口中增加确定取消按钮

    比例a标签点击后,弹出带确定与取消的窗口,点击确定则执行一个动作,否则不执行. 首先我们用ecshop 模板使用举例 {if $votings eq 1} οnclick="if (conf ...

  6. 如何构建JavaScript警报框或弹出窗口

    Popup boxes (or dialog boxes) are modal windows used to notify or warn the user, or to get input fro ...

  7. 自动弹窗被拦截 html,用JavaScript检查弹出窗口是否被阻拦的方法

    JavaScript弹出窗口很讨厌,所有人都不喜欢弹出窗口,但很多网站认为弹出框口很有用,需要弹出窗口.对于开发这样的网站的程序员,他们有个棘手的问题,他们不知道这些弹出窗口是否被浏览器或各种浏览器插 ...

  8. ASP.NET 弹出窗口

    //ASP.NET 弹出窗口 //来源:http://hi.baidu.com/jordan51341/blog/item/1ab4f9ca8bba1243f21fe7da.html // /// & ...

  9. Javascript弹出div层

    这是一个DIV弹窗效果! 将鼠标移动到此 点击这里查看弹出窗口 这是文章"JavaScript弹出窗口DIV层效果代码"的演示页面,点这里查看原文! 转载于:https://www ...

  10. Web最基本的弹出窗口代码(javascript)

    [1.最基本的弹出窗口代码] 其实代码非常简单: <SCRIPT LANGUAGE="javascript"> <!-- window.open ('page.h ...

最新文章

  1. 出错处理函数abort、exit、atexit、strerror
  2. boost::outcome_v2::std_result用法的测试程序
  3. mysql导入数据比原来多_Oracle和MySQL的数据导入,差别为什么这么大
  4. JavaScript全面学习(中阶)
  5. cf 1504 F. Flip the Cards
  6. springboot项目根据不同的环境启动不同的配置,如开发环境dev,测试环境sit,生产环境application...
  7. 移动端UI自动化Appium测试——Appium server两种启动方式
  8. 【Angular 4】 Cannot find module 'rxjs-compat'
  9. 【codeforces】【比赛题解】#950 CF Round #469 (Div. 2)
  10. java list 差集_Java基础之集合框架
  11. 每个Java开发者应该知道(并爱上)的8个工具
  12. 全网首发:char数组矩阵转bit的算法
  13. Atitit 数据类型体系图 目录 1. 系统常用的数据类型 1 2. H5 form表单新数据类型 2 2.1. TML5 新的 Input 类型 2 2.2. HTML5 的新的表单元素: 2
  14. linux命名管道fifo通信示例
  15. 宝塔linux 搭建rtmp+ffmpeg转流直播服务器
  16. 【C语言】详解 calloc() 函数
  17. 大数据与云计算 | 华科软院2020年期末考试试题及答案
  18. 枚举,联合,宏定义,结构体
  19. 你不可能成为一个死理性派
  20. AMD GPU驱动,ROCM,Pytorch安装教程(A卡6700xt)

热门文章

  1. HDU 2222 Keywords Search(AC自动机)题解
  2. SonarLint各种提示的意思
  3. Java面试题中的Redis大合集,所有你想找的都在这里!
  4. .Net WebApi接口之Swagger集成详解
  5. tomcat是一个应用服务器
  6. php.ini 中开启短标签 ?=$?
  7. 职场中相信“付出总有回报”的人,后来都怎么样了?
  8. 数据告诉你,抖音凭什么逆袭?
  9. 错过了蓝月亮,你还有我们~~只此一次!
  10. 软件验收测试报告报价,软件验收测试介绍和软件验收报告的费用是多少?