摘要: b := []byte("abc1def1") pat := `abc1|abc1def1` reg1 := regexp.MustCompile(pat) // 第一匹配 reg2 := regexp.MustCompilePOSIX(pat) // 最长匹配 fmt.Printf("%s\n", 阅读全文
posted @ 2020-04-10 11:08 柠檬abcd 阅读(123) 评论(0) 推荐(0) 编辑
摘要: 一:文件操作 1.1:打开和关闭文件,读内容 func main() { //打开文件 openFileObj, err := os.Open("text.txt") if err!=nil{ fmt.Println("open file failed") return } defer openFi 阅读全文
posted @ 2020-04-03 13:48 柠檬abcd 阅读(161) 评论(0) 推荐(0) 编辑
摘要: 一:HTML5新增的属性 HTML目录: 1、新增的标签 语义化标签 canvas(画板) svg audio(音频播放) video(视频播放) 2、新增的属性 placeholder calendar,date time email url search ContentEditable Drag 阅读全文
posted @ 2019-11-30 18:55 柠檬abcd 阅读(589) 评论(0) 推荐(0) 编辑
摘要: 1 、 字体放大,缩小 <body> <div class="wrapper"> <button id="btn1">放大</button> <button id="btn2">缩小</button> <p>Lorem ipsum dolor Similique perferendis impedi 阅读全文
posted @ 2019-11-17 08:50 柠檬abcd 阅读(238) 评论(0) 推荐(0) 编辑
摘要: div{ width: 200px; height: 200px; border:1px solid #000; //* 要加绝对地位 */ position: absolute; //* 50%-width的一半,水平居中 */ left: calc(50% - 100px); //* 50%-h 阅读全文
posted @ 2019-11-09 20:35 柠檬abcd 阅读(161) 评论(0) 推荐(0) 编辑
摘要: 一:字体放大缩小 <div class="wrapper"> <button id="btn1">放大</button> <button id="btn2">缩小</button> <p>Lorem ipsum dolor Similique perferendis impedit quibusda 阅读全文
posted @ 2019-11-05 20:24 柠檬abcd 阅读(163) 评论(0) 推荐(0) 编辑
摘要: 一:组件案例发表评论 HTML代码如下: vue代码如下: // 分析:发表评论的业务逻辑 // 1、评论数据存放到localstorage,localStorage.setItem('cmst','') // 2、先组织出一个最新的评论数据对象 // 3、把第2部中得到的评论对象保存到locals 阅读全文
posted @ 2019-11-02 12:30 柠檬abcd 阅读(882) 评论(0) 推荐(0) 编辑
摘要: $.ajax({ type: 'GET',//请求类型 url: 'https://open.duyiedu.com/api/student/findAll',//请求地址 beforeSend: function (xhr, request) {//发出请求之前执行的函数,请求拦截 console.log(request.... 阅读全文
posted @ 2019-11-01 16:54 柠檬abcd 阅读(91) 评论(0) 推荐(0) 编辑
摘要: 一:vue指令: vue代码: 例子:跑马灯效果 substring 来进行字符串的截取,把第一个截取放最后面 html代码如下: vue代码如下: v-on事件修饰符: //<!-- capture捕获事件,从外到里输出 --> <div id="app3" @click="divHandle"> 阅读全文
posted @ 2019-10-30 21:32 柠檬abcd 阅读(355) 评论(0) 推荐(0) 编辑
摘要: 一:认识jQuery 1、jQuery 的优点 (1)、轻量级 (2)、链式操作方式 (3)、隐式迭代 (4)、不污染顶级变量 (5)、可靠的事件处理机制 (6)、完善的ajax,jQuery 所有的ajax操作封装到一个函数$.ajax()里面,使得开发者处理ajax的时候,能够专心处理业务逻辑, 阅读全文
posted @ 2019-10-29 17:23 柠檬abcd 阅读(213) 评论(0) 推荐(0) 编辑