//构造函数
function Box(name,age){
this.name=name;
this.age=age;
this.run=function(){
return this.name+'--'+this.age;
}
}
var box1= Box('gao',23);//我是一个对象
var box2=new Object();
Box.call(box2,'chen','24'); 对象冒充
console.log(box2 instanceof Object);//冒充后我依然从属于Object对象
console.log(box2 instanceof Box);//冒充后我并不从属于与Box window.setInterval(method,time)方法本身会返回一个资源句柄,使用clearInterval(Intervalid)方法即可清除定时器<script> var num=0; //每隔1秒再控制台输...
离线缓存的开启实例使用apache设置 1.apache配置文件搜索Addtype,我的addtype已经存在项目,如下 AddType application/x-compress .Z AddType application/x-gz...
<!-- 三个核心方法 openDatabase:这个方法使用现有数据库或创建...
<!doctype html> <html> <head> <meta charset="utf-8"> <title>无标题文档</title> <script type...
<!DOCTYPE html> <html> <head> <meta charset="utf-8" /> <title>获取mac地址</title> </head&g...
通过FormData对象可以组装一组用 XMLHttpRequest发送请求的键/值对。它可以更灵活方便的发送表单数据,因为可以独立于表单使用。如果你把表单的编码类型设置为multipart/form-data ,则通过FormData传输的数据格式和表单通过submit() 方法传输的数据格式相同...