Processing math: 100%

04 2020 档案

摘要:``` private function left_time_str($sale_time){ saletime=strtotime(sale_time); lefttime=sale_time - time(); if(lefttime0)str .= day.;if(hour >... 阅读全文
posted @ 2020-04-29 18:40 盘思动 阅读(1110) 评论(0) 推荐(0) 编辑
摘要:``` var tmp_arr_1 = new Array(); var tmp1 = {'type':1,'plan_num':200}; tmp_arr_1.push(tmp1); tmp_arr_1.push(tmp1); console.log(tmp_arr_1); tmp_arr_1[0]['type'] = ' '; console.log('--变化一个后--'); console 阅读全文
posted @ 2020-04-28 16:32 盘思动 阅读(2641) 评论(0) 推荐(0) 编辑
摘要:``` js中字符串的替换在js中字符串全部替换可以用以下方法:两种区别:正则&常规str.replace("需要替换的字符串","新字符串") str.replace(/需要替换的字符串/g,"新字符串")比如:"yyyy-MM-dd-hh-mm-ss".replace("-","/")结果如下: "yyyy/MM-dd-hh-mm-ss""yyyy-MM-dd-hh-mm-ss".replac... 阅读全文
posted @ 2020-04-13 21:25 盘思动 阅读(14557) 评论(0) 推荐(0) 编辑
摘要:new Promise(function(resolve){ console.log('马上执行for循环'); for(var i = 0; i < 1000; i++){ resolve(); console.log(i); } }).then(function(){ console.log(' 阅读全文
posted @ 2020-04-09 22:27 盘思动 阅读(945) 评论(0) 推荐(0) 编辑
摘要:``` 文字 使用第一种的方法e.target.dataset.action 会获取当前点击的元素的action,则获取图片上的action,图片上没有action便取的是undefined; 使用第二种的方法e.currentTarget.dataset.action 会获取有事件的那个元素,即view,所以获得“father” ``` 阅读全文
posted @ 2020-04-09 20:48 盘思动 阅读(5194) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示