随笔分类 - JS
摘要:代码 # coding:utf-8 import http.server import json import psutil import socket import platform import multiprocessing import os # 获取网络接口信息 def get_netwo
阅读全文
摘要:https://terryz.gitee.io/vue/#/selectpage <v-selectpage data="/api/intrusionevent/lists" v-model="temp.event_id" key-field="id" show-field="description
阅读全文
摘要:http://music.163.com/api/song/media?id=1417093533
阅读全文
摘要:import { createRouter, createWebHistory } from 'vue-router' import Home from '@/view/Home.vue'; import Login from '@/view/Login.vue' const routes = [
阅读全文
摘要:代码如下: 图片下载后,把扩展名的jpg改成zip
阅读全文
摘要:^\s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d
阅读全文
摘要:/^([a-zA-Z0-9]+[_|_|\-|.]?)*[a-zA-Z0-9]+@([a-zA-Z0-9]+[_|_|.]?)*[a-zA-Z0-9]+\.[a-zA-Z]{2,6}$/ 支持中间带点的邮箱格式,例如: bill.gates@gmail.com、elon.musk@twitter.c
阅读全文
摘要:String.prototype.trim = function (char, type) { if (char) { if (type == 'left') { return this.replace(new RegExp('^\\'+char+'+', 'g'), ''); } else if
阅读全文
摘要:function is_ip(ip){ let re = /^([0-9]|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.([0-9]|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.([0-9]|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\
阅读全文
摘要:function clearDomScriptTag(s) { var reg=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi; //生成相关正则信息 s = s.replace(reg, "");//忽略大小写的正则 return s;
阅读全文
摘要:layer.open({ type: 1, content: $("在当前页面上要打开的元素"), shadeClose: true , scrollbar: true, success: function (layero, index) { //弹出层打开后回调代码 }, cancel: func
阅读全文