JavaScript 对象属性遍历
collections["Canca"] = "Canca Torvals";
for(var key in collections){
alert(collections[key]);
}
以下是一篇本人在Qzone里写下的文章,现在放到这里来,欠丑了。希望对一些初学者有一点点帮助。 今天给大家说说JavaScript中的类。类?没错。JavaScript中的函数原型对象就是OOP中人们熟悉的类。..…
《Dom Scripting》读书笔记 Canca 最近看了一本《Jeremy Keith: DOM Scripting, Web design with JavaScript and the DOM. Apr…
1>window.prompt(text, value) 簡單的基與模態窗體的對話框,(返回你輸入) var v=window.prompt("提示","請輸入你的名字")2>window.confirm(text,mess) 模態確認框(返回"是/否…
基本方法:attachEvent(IE)/detachEvent;addEventListener( Mozilla, Netscape, Firefox)/removeEventListener在之前的邏輯判斷式的基礎上,在設計javascript的時候,可以針對瀏覽器的不同,寫出適合不同種類瀏覽…
1.document.formName.item("itemName") 问题说明:IE下,可以使用document.formName.item("itemName")或document.formName.elements["elementName"];Firefox下,只能使用docum…
本来一个写好了的脚本在IE下正常,可是在mozilla firefox中我们发现程序报类似如下的错误: event is not defined obj has no properties 原因是Firefox中使用了不同的事件对象模型,不同于IE Dom,用的是W3C Dom. 下是我在网上找到的…