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

推荐订阅源

CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
Security Latest
Security Latest
C
CXSECURITY Database RSS Feed - CXSecurity.com
AI
AI
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
P
Palo Alto Networks Blog
Spread Privacy
Spread Privacy
Project Zero
Project Zero
Google Online Security Blog
Google Online Security Blog
The Cloudflare Blog
L
LangChain Blog
T
Tenable Blog
GbyAI
GbyAI
C
Cybersecurity and Infrastructure Security Agency CISA
大猫的无限游戏
大猫的无限游戏
Last Week in AI
Last Week in AI
量子位
Cloudbric
Cloudbric
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
美团技术团队
S
Secure Thoughts
P
Privacy & Cybersecurity Law Blog
S
Securelist
S
Schneier on Security
F
Full Disclosure
Engineering at Meta
Engineering at Meta
A
Arctic Wolf
Microsoft Security Blog
Microsoft Security Blog
Apple Machine Learning Research
Apple Machine Learning Research
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
爱范儿
爱范儿
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
P
Privacy International News Feed
宝玉的分享
宝玉的分享
A
About on SuperTechFans
博客园 - 【当耐特】
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
Hugging Face - Blog
Hugging Face - Blog
Webroot Blog
Webroot Blog
Google DeepMind News
Google DeepMind News
H
Heimdal Security Blog
Y
Y Combinator Blog
月光博客
月光博客
H
Hacker News: Front Page
MongoDB | Blog
MongoDB | Blog
C
Check Point Blog
TaoSecurity Blog
TaoSecurity Blog
腾讯CDC
N
Netflix TechBlog - Medium

博客园 - 兵

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里面阻止拖拽操作呢