摘要: <script>function get_get(){querystr = window.location.href.split("?")if(querystr[1]){GETs = querystr[1].split("&")GET =new Array()for(i=0;i<GETs.length;i++){tmp_arr = GETs[i].split("=")key=tmp_arr[0]GET[key] = tmp_arr[1]}}return querystr[1];}//如果地址是 test.ht 阅读全文
posted @ 2011-09-16 10:48 gds111789 阅读(6261) 评论(0) 推荐(1) 编辑
摘要: 原处:http://www.blogjava.net/ilovezmh/archive/2007/04/16/111098.html一、定义类或对象1.工厂方式创建对象carvar oCar = new Object;oCar.color = "red";oCar.doors = 4;oCar.mpg = 23;oCar.showColor = function(){alert(this.corlor);};创建多个carfunction createCar(color, doors, mpg) { var tempcar = new Object; tempcar.col 阅读全文
posted @ 2011-09-16 10:19 gds111789 阅读(201) 评论(0) 推荐(0) 编辑
摘要: 原文出处:http://www.blogjava.net/ilovezmh/archive/2007/04/16/111106.html一、继承的方式1.对象冒充function ClassA(sColor) { this.color = sColor; this.sayColor = function () { alert(this.color); };}function ClassB(sColor, sName) { this.newMethod = ClassA; this.newMethod(sColor); delete this.newMethod; this.name = sNa 阅读全文
posted @ 2011-09-16 10:19 gds111789 阅读(177) 评论(0) 推荐(0) 编辑