js
看雪看月亮
比自己优秀的人都那么努力,还有什么理由不努力!
展开
-
记录一些常用正则验证
1、字符串每隔3个汉字换行 let city = "听妈妈的话要快快长大"; city=city.replace(/[^\x00-\xff]/g,"$&\x01").replace(/.{6}\x01?/g,"$&\n").replace(/\x01/g,""); console.log(city);//听妈妈的话要快快长大2、清楚字符串中的换行符let name = name.replace(/\n|\r/g, "");3、清楚字符串中的空格str = str原创 2021-06-04 17:52:28 · 136 阅读 · 0 评论 -
js删除数组中元素,改变下标问题
js删除数组中元素,改变下标问题js删除数组中元素,改变下标问题方法一:使用标识flagfor(var i=0,flag=true,len=this.fuzzyQueryList.length;i<len;flag ? i++ : i){ if(fatherName == list.fatherName && name == list.name) { thi...原创 2019-11-05 17:26:01 · 2448 阅读 · 0 评论 -
轮播无限向上滚动
<!DOCTYPE html><html> <head> <meta charset="UTF-8"> <title></title> <script src="jquery-1.9.0.js" type="text/javascript" c...原创 2019-05-28 16:20:12 · 363 阅读 · 0 评论 -
vue项目中使用jsplumb流程图(以及类似官网的放大缩小漫游)
html//jsplumb初始化jsplumb(_this) {jsPlumb.ready(function() {_this.instance = jsPlumb.getInstance({ Endpoint: ["Dot", { radius: 2, cssClass: "dot" }], //连线 Connector: ['Bezier', { curvines...原创 2019-05-28 17:41:15 · 11558 阅读 · 7 评论