惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

S
Security Affairs
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
N
Netflix TechBlog - Medium
云风的 BLOG
云风的 BLOG
M
MIT News - Artificial intelligence
A
About on SuperTechFans
Last Week in AI
Last Week in AI
博客园 - 叶小钗
博客园 - Franky
腾讯CDC
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
The GitHub Blog
The GitHub Blog
Google DeepMind News
Google DeepMind News
H
Hackread – Cybersecurity News, Data Breaches, AI and More
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
小众软件
小众软件
The Hacker News
The Hacker News
C
Cisco Blogs
C
CXSECURITY Database RSS Feed - CXSecurity.com
L
LangChain Blog
WordPress大学
WordPress大学
美团技术团队
P
Proofpoint News Feed
T
Threat Research - Cisco Blogs
AWS News Blog
AWS News Blog
S
Securelist
T
Tenable Blog
I
Intezer
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
L
LINUX DO - 热门话题
博客园 - 三生石上(FineUI控件)
Y
Y Combinator Blog
Cisco Talos Blog
Cisco Talos Blog
T
Tor Project blog
Security Latest
Security Latest
Apple Machine Learning Research
Apple Machine Learning Research
C
Cybersecurity and Infrastructure Security Agency CISA
S
Schneier on Security
L
Lohrmann on Cybersecurity
P
Privacy & Cybersecurity Law Blog
月光博客
月光博客
P
Proofpoint News Feed
Vercel News
Vercel News
Simon Willison's Weblog
Simon Willison's Weblog
G
GRAHAM CLULEY
T
The Blog of Author Tim Ferriss
F
Fortinet All Blogs
博客园 - 【当耐特】
A
Arctic Wolf
aimingoo的专栏
aimingoo的专栏

博客园 - Lavenders

Java 正则表达式 量词 --- 三种匹配模式【贪婪型、勉强型、占有型】 信号量与PV操作 java的(PO,VO,TO,BO,DAO,POJO)解释 使用Application对象简单完成网站总访问人数的统计 jquery jqPlot API 中文使用教程 一款基于bootstrap的datetimepicker ASP.NET下CKEditor3.6.4结合CKFinder2.3实现文本编辑器的上传功能 VS2010创建Web Service程序 【原创】VS2010中水晶报表与VS2008水晶报表版本冲突问题 【转】XSL和XSLT jQuery历史版本 【转】让Iframe自适应高度 【转】框架集中framespacing、border和frameborder属性的关系 【转】Meta标签详解 ASP.NET保存信息总结(Application、Session、Cookie、ViewState和Cache等) . 【原创】VS2008 Web应用程序带数据库制作安装程序 asp.net中的缓存(三)应用程序数据缓存 asp.net中的缓存(二)局部数据缓存 asp.net中的缓存(一)页面输出缓存
更新记录后关闭子窗口并刷新父窗口的Javascript
Lavenders · 2013-10-18 · via 博客园 - Lavenders

有时我们需要在新打开的窗口里面编辑信息,等编辑完了,需要将当前窗口关闭并且刷新父窗口,以使修改生效,本文就是介绍用 javascript 来实现"更新记录后关闭子窗口并刷新父窗口".

父窗口代码:

  1. <a href="javascript:void(0)" onclick="window.open('child.html','child','width=400,height=300,left=200,top=200');">打开子窗口</a>

子窗口代码:

              <script language="JavaScript" type="text/javascript">

  1. <!--

  2. function refreshParent()

  3. {

  4. window.opener.location.href = window.opener.location.href;

  5. if (window.opener.progressWindow)

  6. {

  7. window.opener.progressWindow.close();

  8. }

  9. window.close();

  10. }

  11. //-->

  12. </script>

  13. <a href="javascript:void(0)" onclick="refreshParent()">刷新父窗口关闭当前窗口</a>