随笔分类 -  js

摘要:js创建类 1. 使用`function`关键字创建类 ``` function test(para){ this.para = para; this.route; var p = 100; // 私有属性只能在内部使用 this.add = function(){ console.log(para 阅读全文
posted @ 2019-11-29 11:01 allOfme 阅读(459) 评论(0) 推荐(0)
摘要:使用jquery的$.ajax引用json数据 1 function getonload(){ 2 $.ajax({ 3 type: "POST", 4 dataType: "json", 5 url: "data.json", 6 async: false, // 这里使用的是同步,虽然不建议这样 阅读全文
posted @ 2019-11-27 14:23 allOfme 阅读(12868) 评论(0) 推荐(0)