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

推荐订阅源

Simon Willison's Weblog
Simon Willison's Weblog
Help Net Security
Help Net Security
P
Privacy International News Feed
T
Threat Research - Cisco Blogs
C
Cisco Blogs
C
CERT Recently Published Vulnerability Notes
NISL@THU
NISL@THU
L
LINUX DO - 热门话题
Security Latest
Security Latest
A
Arctic Wolf
G
GRAHAM CLULEY
月光博客
月光博客
S
Securelist
D
Docker
J
Java Code Geeks
T
Troy Hunt's Blog
T
Tenable Blog
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
SecWiki News
SecWiki News
S
Security @ Cisco Blogs
量子位
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
L
LINUX DO - 最新话题
Recent Commits to openclaw:main
Recent Commits to openclaw:main
aimingoo的专栏
aimingoo的专栏
博客园 - 【当耐特】
H
Heimdal Security Blog
The Hacker News
The Hacker News
博客园 - 三生石上(FineUI控件)
Application and Cybersecurity Blog
Application and Cybersecurity Blog
N
Netflix TechBlog - Medium
Vercel News
Vercel News
Forbes - Security
Forbes - Security
B
Blog RSS Feed
H
Hackread – Cybersecurity News, Data Breaches, AI and More
IT之家
IT之家
B
Blog
MongoDB | Blog
MongoDB | Blog
博客园 - 聂微东
Google DeepMind News
Google DeepMind News
S
Secure Thoughts
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
C
Check Point Blog
云风的 BLOG
云风的 BLOG
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
T
The Blog of Author Tim Ferriss
L
Lohrmann on Cybersecurity
F
Full Disclosure
D
Darknet – Hacking Tools, Hacker News & Cyber Security
P
Proofpoint News Feed

博客园 - Leonny

IIS站点/虚拟目录中访问共享目录(UNC)以及建立后的应用程序的信任级别问题 谁说用Azure就一定要Vista/Win7?Window2003/xp下安装 Windows Azure Tools for Microsoft Visual Studio 关于清理JBoss服务器端jsp文件缓存的问题 提取assemblyinfo.cs文件里的guid值 经常坐电脑旁的人必喝的健康饮品 Firefox图片模糊的问题 MS SQL Server2005如何得到记录的行号 [原创]OWC生成Excel的效能优化 [译]NUnitForms官方说明文档 C#取得MS Word的总页数 VS2008中文版安装ASP.NET MVC Beta WinForm下ComboBox添加项与设定预选项 成功申请了GAE Vista删你文件没商量 3大数据库的变量参数符号 新立得软件包管理器出错 Repeater中點擊按鈕事件時要注意頁面PostBack的問題 關於Web Service 中使用NHibernate時無法序列化IList的問題 如何取得輸入字符串的寬度
IE的window.showModalDialog出现内存不足的问题 - Leonny - 博客园
Leonny · 2009-04-28 · via 博客园 - Leonny

今天在使用window.showModalDialog时, 发现IE一打开模态窗口就报"存储空间不足,无法完成此操作。"的错误.

跟踪发现竟是jQuery的问题. 但很奇怪, 在一般窗口则一点问题都没有. 于是google了半天, 找不到解决方法.

后来在搞了大半个小时终于找到了问题的所在. 原来IE在模态窗口中不能访问 "navigator.userAgent", 而jQuery里面用了.

 我总不能为了这么个小东东放弃jQuery吧.

后来查了下, 它里面就访问过一次., 我改一下jQuery吧. 

其实很简单, 判断一下当前的窗口是不是模态窗口就行了:

在jQuery中找到 navigator.userAgent.toLowerCase()

改成:

((parseInt(self.dialogWidth)>=0)?"":navigator.userAgent.toLowerCase())

因为一般窗口没有dialogWidth的属性, 所以用它来作是否模态的判断.

这样就OK啦.

打完...收工!!