- 昵称:51助手
- 博龄:6年5个月23天
- 粉丝:122
- 关注:108
- +关注
搜索
文章分类
博客档案
百度编辑器支持prism.js 代码高亮
摘要:安装 prism.js https://www.51zuso.com/admin/p/1397.html在内容显示页面加上这个代码<script> var $codepre = $("pre[class]&
prism.js 代码高亮
摘要:官网:https://prismjs.com/download.html选择需要的主题很语言我所选的配置https://prismjs.com/download.html#themes=prism-okaidia&languages=markup+css+clike+javascript+abap+abnf+a
js post 发送数组后台接收
摘要:js在发送数组时,发现php后台接收到的是字符串报错,所以,在发送时需要数组转到json字符串,后台接到到json字符串在转为数组例:js 数组arr = [1,2,3,4];转 json 字符串JSON.stringify(arr)php 接收arr =&n
jQuery.noConflict(true) 解决jquery版本冲突
摘要:jQuery.noConflict(true) 加 true 比较稳<!doctype html> <html> <head> <meta charset="UTF
常用正则表达式
摘要:表单字段验证常用正则表达式1、姓名/^[\u4e00-\u9fa5]{2,4}$/ //2-4个中文字符正则2、手机号码/^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\d{8}$/3、座机号码/^(0\d{2,3})-?(\d{7,8})
手机端自适应单位rem
摘要:<script> (function (win,doc){ if (!win.addEventListener) alert('b2'); var html=document.documentElement; function setFont() {
vue中async/await的用法
摘要:async 异步请求意思不阻碍其它代码继续往下执行async function timeout() { return 'hello word'; } console.log(timeout()); console.log('虽然在后面,但是我先执行');可以看到
js ()=>写法
摘要:两种函数对this的解释是不同的。箭头函数() => {} 的this与父函数相同,function() {} 的this是自身的
jQuery获取元素尺寸及位置一些方法
摘要:返回或设置文档的滚动条的垂直位置。jQuery(window).scrollTop() jQuery(window).scrollTop(offset)网页工作区域高度jQuery(window).height()整个网页文档的高度jQuery(document).height()某个元素相对于document文档的