随笔分类 -  js ,jq

摘要:changeColor() { let color = '#' + Math.floor( Math.random() * 0xffffff ).toString(16); } 阅读全文
posted @ 2022-06-30 15:30 盘思动 阅读(69) 评论(0) 推荐(0) 编辑
摘要:demo 1 demo2 var fruits = ["Banana", "Orange", "Apple", "Mango"]; fruits.splice(2,1,"Lemon","Kiwi"); 输出结果: Banana,Orange,Lemon,Kiwi,Mango 可以对比php中arra 阅读全文
posted @ 2021-11-03 11:17 盘思动 阅读(234) 评论(2) 推荐(0) 编辑
摘要:我们可以使用 JSON.parse() 方法将数据转换为 JavaScript 对象 阅读全文
posted @ 2021-10-15 20:10 盘思动 阅读(124) 评论(0) 推荐(0) 编辑
摘要:window.location.href = document.referrer; 先抓取到上个页面的链接 document.referrer; 阅读全文
posted @ 2021-08-06 17:56 盘思动 阅读(127) 评论(3) 推荐(0) 编辑
摘要:var cheng = xmSelect.render({ el: '#cheng_xm_select_id', data: [ <?php foreach(chenguserlistasv){ ?> <?php if($v['is_sign'] == 1){ ?> <?php echo 阅读全文
posted @ 2021-08-04 18:01 盘思动 阅读(729) 评论(0) 推荐(0) 编辑
摘要:<input class="form-control-erbi col-lg-3" min=1 oninput="javascript:this.value=this.value.replace(/[^\d]$/g,'')" type="text" name="weight" id="weight" 阅读全文
posted @ 2021-05-08 14:20 盘思动 阅读(818) 评论(0) 推荐(0) 编辑
摘要:长链接测试网页:http://coolaf.com/tool/chattest // var intervalID = setInterval(() => { // console.log('gggg'); // getImg() // }, 3000); // function getImg() 阅读全文
posted @ 2021-02-23 17:51 盘思动 阅读(131) 评论(0) 推荐(0) 编辑
摘要:html 代码 <tr data-id="{$vo.id}" data-table_name="article"> <td>{$vo.id}</td> <td>{$vo.title}</td> <td>{$vo.cate_name}</td> <td>{$vo.browse_num}</td> <t 阅读全文
posted @ 2020-07-30 11:47 盘思动 阅读(166) 评论(0) 推荐(0) 编辑
摘要:如果是整数类型 可以用digit 类型来取代number, digit maxlength 属性就生效了~ 阅读全文
posted @ 2020-07-24 14:55 盘思动 阅读(184) 评论(0) 推荐(0) 编辑
摘要:``` 首先得知道window.showModalDialog()方法到底是干嘛的,有什么作用.基本介绍: showModalDialog() (IE 4+ 支持) showModelessDialog() (IE 5+ 支持) window.showModalDialog() 方法... 阅读全文
posted @ 2020-05-20 09:03 盘思动 阅读(3244) 评论(0) 推荐(0) 编辑
摘要:"" 阅读全文
posted @ 2020-05-08 09:07 盘思动 阅读(157) 评论(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 盘思动 阅读(2642) 评论(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 盘思动 阅读(14560) 评论(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 盘思动 阅读(946) 评论(0) 推荐(0) 编辑
摘要:window.parent.location.reload(); history.go(-1);// 仅仅返回,没有再刷新的效果 阅读全文
posted @ 2020-03-12 14:33 盘思动 阅读(337) 评论(0) 推荐(0) 编辑
摘要:``` art-templatehttp://aui.github.io/art-template/``` 阅读全文
posted @ 2020-03-12 14:21 盘思动 编辑
摘要:``` $("#subForm").submit(function() { $.ajax({ url: "/api.php/Jd/sub", data: $("#subForm").serializeArray(), type: "POST", dataType: "json", success: function(data) { var errno = ... 阅读全文
posted @ 2020-03-11 22:16 盘思动 阅读(269) 评论(0) 推荐(0) 编辑
摘要:``` person.forEach((item,index) => { console.log( item.id ); if( id == item.id ){ item.is_selected = 1; // 赋值 } else { item.is_selected = 0; } }) ``` 阅读全文
posted @ 2020-02-28 14:51 盘思动 阅读(4336) 评论(0) 推荐(1) 编辑
摘要:loading..... 阅读全文
posted @ 2020-01-09 15:02 盘思动 阅读(419) 评论(2) 推荐(0) 编辑

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