//js中的对象申明使用new Object(); //object类型的数据类似于数组通过下表来访问其中的值 //example1 var person=new Object(); person.name="张三"; person.age="; person.sex="男"; for(var i in person){ console.log(i+":"+person[i]); /*output: name:张三 age:12 sex
参考:http://stackoverflow.com/questions/650764/how-does-proto-differ-from-constructor-prototype http://blog.rainy.im/ __proto__ is the actual object that is used in the lookup chain to resolve methods, etc. prototype is the object that is used to build
简介:字符串转日期型函数 传入一个字符串格式的日期,如何转换为日期型的.以下为转换方案. //字符串转换为日期函数,返回日期型(传入的日期格式2014-04-22) function StringToDate(str) { var strDate = str.split(" "); var strDatepart = strDate[0].split("-"); var dtDate = new Date(strDatepart[0],strDatepart[