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

推荐订阅源

C
CXSECURITY Database RSS Feed - CXSecurity.com
WordPress大学
WordPress大学
Microsoft Security Blog
Microsoft Security Blog
GbyAI
GbyAI
V
Visual Studio Blog
The Register - Security
The Register - Security
Y
Y Combinator Blog
I
InfoQ
小众软件
小众软件
D
Darknet – Hacking Tools, Hacker News & Cyber Security
Scott Helme
Scott Helme
C
Cybersecurity and Infrastructure Security Agency CISA
T
Threatpost
Hacker News: Ask HN
Hacker News: Ask HN
P
Privacy International News Feed
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
A
Arctic Wolf
P
Privacy & Cybersecurity Law Blog
AWS News Blog
AWS News Blog
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
Google DeepMind News
Google DeepMind News
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
有赞技术团队
有赞技术团队
酷 壳 – CoolShell
酷 壳 – CoolShell
C
Check Point Blog
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
Security Archives - TechRepublic
Security Archives - TechRepublic
Apple Machine Learning Research
Apple Machine Learning Research
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
S
Security Affairs
Cyberwarzone
Cyberwarzone
V
Vulnerabilities – Threatpost
C
Cyber Attacks, Cyber Crime and Cyber Security
H
Hackread – Cybersecurity News, Data Breaches, AI and More
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
爱范儿
爱范儿
Spread Privacy
Spread Privacy
Recent Commits to openclaw:main
Recent Commits to openclaw:main
阮一峰的网络日志
阮一峰的网络日志
The GitHub Blog
The GitHub Blog
C
CERT Recently Published Vulnerability Notes
IT之家
IT之家
月光博客
月光博客
雷峰网
雷峰网
博客园 - 【当耐特】
Stack Overflow Blog
Stack Overflow Blog
美团技术团队
NISL@THU
NISL@THU
U
Unit 42
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报

博客园 - 兵

C#异常处理的方式 CryptoAPI与.NET数字签名类的交互问题 Firefox中Iframe的blur与focus事件问题 .NET中几种基本的线程同步方法 为什么说WinForm的控件只能在主线程中创建和调用 C#与Native C++互相访问 PHP5中的引用 Windows版的PDO太衰了 Framework里某些类型成员方法的一点疑惑 C#中COM操作(二)---接口查询 C#中COM操作(一)---实例化 非弹出式的模态对话框的背景遮罩 DOTNET事件拾遗 CSS开发辅助工具:Internet Explorer Developer Toolbar 另外一种高效地判断奇数和偶数的方法 如何利用客户端缓存对网站进行优化? 一个多表查询引出的问题(2) 类的成员初始化顺序 一个多表查询引出的问题(1)
发现一个FireFox的问题
· 2008-08-04 · via 博客园 - 兵

    最近做网页的时候要求一个输入框只能输入数字,发现在ff的input上挂的dragenter和dragover事件不工作,一开始以为是自己的代码写的不对,DEBUG了半天,发现这段代码在IE下是好好的,可是在FF下就是不工作.GOOGLE了一下发现网上遇到这个问题的不止我一个,http://forums.mozillazine.org/viewtopic.php?p=1252112,看了一下文章发表的时间是2005年,那个时候应该是FF2.0左右吧,现在都3.0了还是会有这个问题,貌似FF开发团队不认为这是个BUG,本来就不打算支持

 1 <form>
 2 <input id="aaa" type="text" value="12345" /> 111111111111111</form>
 3 
 4 <script language="JavaScript1.2" type="text/javascript">
 5 function resetField(id)
 6 {
 7    field = document.getElementById(id);
 8    field.value = "";
 9    // if you comment out the above line then ff will not crash.
10    x = 1;
11 }
12 
13 field = document.getElementById("aaa");
14 if (typeof field.addEventListener == "function")
15    {
16    field.addEventListener("dragover",function(){resetField('aaa');},true);   
17    alert("added DOM event");
18    }
19 
20 if (typeof field.ondragenter != "undefined")   
21    {
22    field.ondragenter = function(){resetField('aaa')};
23    alert("added IE event");
24    }
25 
26 -->
27 </script>

类似的还有剪贴板操作,这个到是因为安全的原因,一开始就没有打算支持,但是也提供了paste事件,供我们在FF的js里完全阻止粘贴操作,但是拖拽文本的话,没有这两个事件的支持的话,怎么做到在FF里面阻止拖拽操作呢