安装 prism.js https://www.51zuso.com/admin/p/1397.html在内容显示页面加上这个代码<script> var $codepre = $("pre[class]&
官网:https://prismjs.com/download.html选择需要的主题很语言我所选的配置https://prismjs.com/download.html#themes=prism-okaidia&languages=markup+css+clike+javascript+abap+abnf+a
第一种:利用 json.parse 和 json.stringifythis.list= json.parse( json.stringify(this.list2) )第二种:es6 的解析语法this.list= { ...this.list2}this.arr= [...this.arr2]
function upFile(){ // 允许上传的图片后缀 $allowedExts = array("gif", "jpeg", "jpg", "png", "mp4"
js判断手机端跳转 到 域名/m<script type="text/javascript"> if(window.location.toString().indexOf('pref=padinde
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>Document</title> <link rel="stylesheet"&n
根据数组有length属性而json对象没有,从而来判断 if(typeof file.length == 'number' ){ console.log('数组'); } else{ console.log('对象'); }
我们在将数组存入mysql数组库时通过json_encode转成字符串当我们json_decode在取出来时,相应的中文与数字也会变转换为字符串类型,这不是我们想要的,所以在json_encode时添加这两个参数JSON_NUMERIC_CHECK|JSON_UNESCAPED_UNICODEjson_encode(array,JSON_NUMERIC_CH
js在发送数组时,发现php后台接收到的是字符串报错,所以,在发送时需要数组转到json字符串,后台接到到json字符串在转为数组例:js 数组arr = [1,2,3,4];转 json 字符串JSON.stringify(arr)php 接收arr =&n
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})
<!DOCTYPE html> <html> <head> <meta charset="utf-8" /> <title>
插件地址: https://github.com/FranckFreiburger/vue3-sfc-loader 同级目录下添加 一个 myComponent.vue组件<html> <body> <div id="app&quo
1 设置php环境变量(workman启动时需要用到php环境变量)我是从phpstudy找到安装好的php查看是否安装成功php -v2 下载 GatewayWorker (GatewayWorker是基于Workerman开发的一个可分布式部署的TCP长连接框架,专门用于快速开发TCP
<script src="http://api.map.baidu.com/api?v=2.0&ak=aYF3Un151pFUOcF9K98daGzk4cqaIfBE"type="text/javascript"></script><
<?php namespace app\admin\controller; use think\Db; class Exle extends Common { //$header 标头 &n
<script> (function (win,doc){ if (!win.addEventListener) alert('b2'); var html=document.documentElement; function setFont() {
<html> <body> <div class="box"> <ul class="scroll"> &nbs
指定元素添加touchstart事件$('.prize-btn').on('touchstart',function(){ //...空函数即可 });或body上添加touchstart事件document.body.addEventListener('touchst
// 没有返回值 alert('你好');// 返回 false/true let res = confirm('确定删除?'); console.log(res);// 返回用户输入的值或null, 第二个值为指定的默认值(可选) var
admin
seo
ljd
51zuso_70
haotao99
51zuso_77