十年网站开发经验 + 多家企业客户 + 靠谱的建站团队
量身定制 + 运营维护+专业推广+无忧售后,网站问题一站解决
Javascript basic concept.....
我们提供的服务有:网站制作、做网站、微信公众号开发、网站优化、网站认证、黄岛ssl等。为上1000+企事业单位解决了网站和推广的问题。提供周到的售前咨询和贴心的售后服务,是有科学管理、有技术的黄岛网站制作公司
[@more@]function Circle(radius) { this.radius = radius; }
Circle.PI = 3.141592; Circle.UNIT = new Circle(1);
Circle.prototype.area() { // notes: must explicitly specify thiskeyword to property return Circle.PI * this.radius * this.radius; }
Circle.max = function (a,b) { if (a.r > b.r) { return a; }else { return b; } }
uniqueID = function(){ // user can set id back to 0 by: uniqueID.id = 0 if (!arguments.callee.id) arguments.callee.id = 0; return arguments.callee.id++; }; uid = (function(){ // closure, id is persistent and private var id = 0; return function(){ return id++; }; })(); var ret = ""; var i = 10; while (i--) { ret += uniqueID() + "t"; uniqueID.id = 0; } alert(ret); i = 10; ret = ""; while (i--) { ret += uid() + "t"; } alert(ret);