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

推荐订阅源

WordPress大学
WordPress大学
T
Threatpost
阮一峰的网络日志
阮一峰的网络日志
美团技术团队
F
Fortinet All Blogs
The GitHub Blog
The GitHub Blog
月光博客
月光博客
V
Visual Studio Blog
T
Tailwind CSS Blog
Stack Overflow Blog
Stack Overflow Blog
博客园 - 聂微东
Jina AI
Jina AI
J
Java Code Geeks
Martin Fowler
Martin Fowler
大猫的无限游戏
大猫的无限游戏
Recorded Future
Recorded Future
C
Check Point Blog
腾讯CDC
N
Netflix TechBlog - Medium
aimingoo的专栏
aimingoo的专栏
罗磊的独立博客
Hacker News: Ask HN
Hacker News: Ask HN
SecWiki News
SecWiki News
博客园 - Franky
Hacker News - Newest:
Hacker News - Newest: "LLM"
N
News | PayPal Newsroom
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
S
Security @ Cisco Blogs
W
WeLiveSecurity
The Last Watchdog
The Last Watchdog
Cloudbric
Cloudbric
F
Full Disclosure
The Cloudflare Blog
Y
Y Combinator Blog
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
Recent Commits to openclaw:main
Recent Commits to openclaw:main
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Google DeepMind News
Google DeepMind News
MongoDB | Blog
MongoDB | Blog
S
Schneier on Security
Schneier on Security
Schneier on Security
Spread Privacy
Spread Privacy
L
LINUX DO - 热门话题
AI
AI
N
News and Events Feed by Topic
T
Tor Project blog
P
Palo Alto Networks Blog
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
H
Hackread – Cybersecurity News, Data Breaches, AI and More
G
Google Developers Blog

博客园 - 未来帅哥

frp增加IP限制 ISAPI Rewrite 实现简单url重写、二级域名重写 SQL作业的操作全 双鱼座2010运程(终于要苦尽甘来了) wwf mvc学习 杂记 国庆节 惊喜 非常完美 最近想看连续剧或电影 无限级分类查询 端午节忙完了 - 未来帅哥 - 博客园 MOSS下面WEBPART开发小结 SubText学习 如何扩大内需 我当圣诞老人跳舞啦! 用户中心 - 博客园 谁不是在被滚了一百次之后,才在一百零一次才叩响成功的大门. 二叉树的HTML显示
打开自适应子窗体,关闭子窗体刷新父窗体
未来帅哥 · 2009-03-25 · via 博客园 - 未来帅哥

-

    很少使用window.open()方法。做了一个打开自适应子窗体,关闭子窗体刷新父窗体的DEMO。

    父窗体ParentWin.aspx

Code

     ParentWin.aspx.cs  

     protected void Page_Load(object sender, EventArgs e)
    {
        txtBox.Text = System.DateTime.Now.ToString();//验证页面刷新
    }

Code

     ChildWin.aspx.cs

     protected void btnCloseServer_onclick(object sender, EventArgs e)
    {
        Page.ClientScript.RegisterStartupScript(this.Page.GetType(), "error", "<script language='javascript'>alert('子窗口!');self_ReplaceParent(1);window.close();</script>");

    }

   可以再借助AJAX UpdatePanel,刷新父窗体的局部页面,给用户带来更好的体验。

 <打开模式窗体:window.showModalDialog('http://www.17vs.com',null,'toolbar=no,resizable=no,scrollbars=yes,location=no, status=no');">

如果打开的是模式子窗体,要在子窗体的head标签里加上<base   target="_self">,否则在处理服务器端控件的时候,会弹出新窗体!