随笔分类 - JavaScript
摘要://父类 function BaseFun() { var hello = "HelloWorld"; this.HelloPublic = "Hello--World"; var privatefun = function () { alert("hellow"); } this.publicfun = function () { ...
阅读全文
摘要:npm install protobufjs -g pbjs proto\IM.Other.proto -t js>proto\IM.Other.js
阅读全文
摘要:JS方法执行顺序Demo//js.js文件方法如下function get_msg(str){ alert("js文件中方法!"+str);} 结果提示顺序:1.页面中的方法2.Js文件中的方法ok(defer中延迟加载方法,会在onload事件之前执行)3.OnLoad中的方法
阅读全文
摘要://JS文件////构造函数(function(){ }())//基类function BaseCar(){//基类属性this.color="";this.name="";this.len="";}//基类方法BaseCar.prototype={//取得车的基本参数GetCarParater:function(){alert("基本参数\r\n车名:"+this.name+",颜色:"+this.color+",长度:"+this.len);},//取得车的生产厂家Get
阅读全文


浙公网安备 33010602011771号