摘要: 上面代码中,传入函数f的是参数对象obj的地址。因此,在函数内部修改obj的属性p,会影响到原始值。 注意,如果函数内部修改的,不是参数对象的某个属性,而是替换掉整个参数,这时不会影响到原始值。 因为上述中对象obj举个例子,指的地址是1101-1110 这一条街(内存段),改变了这条街P店的名字, 阅读全文
posted @ 2018-09-06 15:41 博客小鹏鹏 阅读(124) 评论(0) 推荐(0) 编辑
摘要: JavaScript 原生提供两个 Base64 相关的方法。 btoa():任意值转为 Base64 编码 atob():Base64 编码转为原来的值 注意,这两个方法不适合非 ASCII 码的字符,会报错。 要将非 ASCII 码字符转为 Base64 编码,必须中间插入一个转码环节,再使用这 阅读全文
posted @ 2018-09-06 11:17 博客小鹏鹏 阅读(218) 评论(0) 推荐(0) 编辑
摘要: 该组件内的图片加载完 然后预加载第二页的图片 这样跳转过去的时候已经加载好了 体验巴适的狠 ( 四川话 很舒服的意思) 阅读全文
posted @ 2018-08-30 11:21 博客小鹏鹏 阅读(940) 评论(0) 推荐(0) 编辑
摘要: Vue.component('remote-script', { render: function (createElement) { var self = this; return createElement('script', { attrs: { type: 'text/javascript'... 阅读全文
posted @ 2018-08-29 15:24 博客小鹏鹏 阅读(1836) 评论(0) 推荐(0) 编辑
摘要: data () { return { src:require('../assets/c.png') } }, mounted () { obj.src = require('../assets/'+ obj.$route.params.id + '.png') } 阅读全文
posted @ 2018-08-29 15:05 博客小鹏鹏 阅读(2488) 评论(0) 推荐(0) 编辑
摘要: gotoPay: function () { let obj = this; if (obj.data.isPay) { //调用微信支付 // http://121.40.112.2:8770/wepay/toorder?userId=&token=&iouId=&openid= util.ajax({ url: API ... 阅读全文
posted @ 2018-08-10 17:10 博客小鹏鹏 阅读(475) 评论(0) 推荐(0) 编辑
摘要: 调用: 对应的JS页面头部引入 或者将数据交互和逻辑分离开来,需要用的时候再调用 阅读全文
posted @ 2018-08-10 17:05 博客小鹏鹏 阅读(1975) 评论(0) 推荐(1) 编辑
摘要: <!DOCTYPE html> <html lang="zh"> <head> <meta charset="UTF-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <meta http-e 阅读全文
posted @ 2018-08-08 16:25 博客小鹏鹏 阅读(282) 评论(0) 推荐(0) 编辑
摘要: <meta http-equiv="Content-Security-Policy" content="block-all-mixed-content"> 阅读全文
posted @ 2018-06-26 17:13 博客小鹏鹏 阅读(405) 评论(0) 推荐(0) 编辑
摘要: 五个月不见了,你是不是和我一样又帅了,今天我们先来看一道经典的关于JS存储的题目,来一场紧张又刺激的脑内吃鸡大战吧: var a = {n:1}; a.x = a = {n:2}; console.log(a.x); console.log(a);· 问输出? 想必大家心中都有答案了 ... 结果很 阅读全文
posted @ 2017-11-20 21:03 博客小鹏鹏 阅读(223) 评论(0) 推荐(0) 编辑