随笔分类 -  JS

JavaScript学习与记录
摘要:转载: https://www.it1352.com/1058955.html 数组的话可以直接用push方法: A.push(B); 对象: ES5: var A = {a:1,b:2}; var B = {c:3,d:4}; for(var key in B ){ if(B.hasOwnProp 阅读全文
posted @ 2021-05-25 11:38 泡沫幻影 阅读(1145) 评论(0) 推荐(0) 编辑
摘要:论坛问题: https://ask.dcloud.net.cn/question/74505 使用: uni.connectSocket(OBJECT) 和 SocketTask.onOpen(CALLBACK) 在安卓手机无法触发websocket的open方法 解决办法使用plus-websoc 阅读全文
posted @ 2019-11-04 12:01 泡沫幻影 阅读(6711) 评论(1) 推荐(0) 编辑
摘要:转载: https://www.cnblogs.com/mofish/p/3388427.html https://www.cnblogs.com/zhangruiqi/p/8027338.html 注意事项: js 数据传递的时候要注意是否为父子页面数据传递 子页面数组不等于父页面数组 如果有其他 阅读全文
posted @ 2019-10-14 16:48 泡沫幻影 阅读(1038) 评论(0) 推荐(0) 编辑
摘要:var postInfoData== {index: 0, checkno: "HN020501810230912210002"} ajax传值的时候会出异常: $.ajax({ url: 'url', data: JSON.stringify(postInfoData),//这里传jSON字符串会 阅读全文
posted @ 2018-10-31 11:38 泡沫幻影 阅读(194) 评论(0) 推荐(0) 编辑
摘要://用某个字符切割成数组 var str = "obj_str"; var arr = str.split('_'); //arr = ['obj','str']; //获取对象的属性 YanXG.fileType = { image: ['jpg','gif','png'], word: ['do 阅读全文
posted @ 2018-09-05 09:59 泡沫幻影 阅读(132) 评论(0) 推荐(0) 编辑