07 2020 档案
摘要:1, //读取cookie function getCookie(name) { var arr, reg = new RegExp("(^| )" + name + "=([^;]*)(;|$)"); if (arr = document.cookie.match(reg)) return une
阅读全文
摘要:1, <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no"> 2, 在iPhone 手机上默认值是(电话号码显示为
阅读全文
摘要:1,写在一个CSS中 /* 竖屏模式 */ @media screen and (orientation: portrait){ /* 主按钮 */ .PageBut1N { width: 10%; height: 8%; top: 90%; left: 38%; } } /* 横屏模式 */ @m
阅读全文
摘要:1, var ii = this.app.graphicsDevice.canvas.parentElement; var ee = this.app.camera; var nn = ee ? ee.script.orbitCamera : null; var a = window.innerWi
阅读全文
摘要:1, /* background-color: #f10a91; */ background-size: contain; background-position: center; background-repeat: no-repeat; background-image: url("public
阅读全文
摘要:1,localStorage 存储数据支持5M大小,只有不清除历史记录,数据就在 var data = { left: 0, top: 0, scale: 1, rotate: 0 }; // localStorage本地存储 window.localStorage.cat_touchjs_data
阅读全文
摘要:1, <! 调试代码 start > <script src="http://cdn.jsdelivr.net/npm/eruda"></script> <script> eruda.init(); </script> <! 调试代码 end > 2,
阅读全文
摘要:1, var gt, vt = S.a.register("OrientationManager")(dt = function() { function t(t) { var e = this; ! function(t, e, n) { e in t ? Object.definePropert
阅读全文
摘要:1, app.get('/NUP', function(req, res, next) { var form = fs.readFileSync('public/NodeUP/index.html', { encoding: 'utf8' }); res.send(form); // 重定向到百度
阅读全文
该文被密码保护。
摘要:1, // 获取参数设置 app.get('/getPara', function(req, res) { // console.log(req.hostname); // console.log(req.params); // console.log(req.path); console.log(
阅读全文
摘要:1,删除数据库下面的 mongod.lock 文件
阅读全文
摘要:1, ##1.增首先我们先看一下demo的目录结构 我们看一下person.json的内容 下面写nodejs的代码 var fs = require('fs'); var params = { "id":5, "name":"白眉鹰王" }//在真实的开发中id肯定是随机生成的而且不会重复的,下一
阅读全文
摘要:1,文件多选 属性: multiple="multiple" <form action="/upload" method="post" enctype="multipart/form-data" multiple="multiple"> <h2>文件上传,大小格式限制</h2> <input typ
阅读全文
摘要:1, index.js文件中:var http = require('http'); var express = require('express'); var router = express.Router(); var cp = require("child_process"); var nod
阅读全文
摘要:1, //const定义的变量不可以修改,而且必须初始化 //var定义的变量可以修改,如果不初始化会输出undefined,不会报错。 //let是块级作用域,函数内部使用let定义后,对函数外部无影响。
阅读全文
摘要:1, .btn{ color: #fff; background-color: #337ab7; border-color: #2e6da4; display: inline-block; padding: 6px 12px; margin-bottom: 0; font-size: 14px; f
阅读全文
摘要:1, var now = timestamp = Date.parse(new Date()) / 1000; console.log(now);输出: 1593856981
阅读全文
摘要:1, background-image: linear-gradient(45deg, red, yellow, blue);
阅读全文
摘要:1, var str="Hello world!" document.write(str.charAt(1)) e 2,
阅读全文
摘要:全局查找字符串正则 window.workspace = 'D:/EsunOPUP/'; var UpFolder = 'OPSC/'; var OssPath = 'OPCloudC'; //此处后面不能加斜杠 // var OssPathReg = /OPCloudC\//g; // var O
阅读全文
摘要:1,CSS样式: .progress { margin-top: 2px; width: 200px; height: 14px; margin-bottom: 10px; overflow: hidden; background-color: #f5f5f5; border-radius: 4px
阅读全文
摘要:1,刷新页面 //刷新页面 //默认为 false,从客户端缓存里取当前页。true, 则以 GET 方式,从服务端取最新的页面 window.location.reload(true);
阅读全文
摘要:1,获取后缀名 //得到后缀名 function get_suffix(filename) { pos = filename.lastIndexOf('.'); suffix = ''; if (pos != -1) { suffix = filename.substring(pos); } ret
阅读全文
摘要:1, //生成自动名 function random_string(len) { len = len || 32; var chars = 'ABCDEFGHJKMNPQRSTWXYZabcdefhijkmnprstwxyz2345678'; var maxPos = chars.length; v
阅读全文
摘要:1,代码块 $(function(){...}); 2,
阅读全文
摘要:1,修改属性 //表示查找第一个.thmodList .thmodItem元素下的a元素,并修改属性href值 //$(".thmodList .thmodItem").eq(0).find("a").attr("href", data.data[i].url);
阅读全文
摘要:1,循环添加内容 var html = ""; $.each(data.data, function(k, v) { html += '<div class="swiper-slide"><a href="javascript:;" data-name="' + v.name + '" data-s
阅读全文
摘要:1,获取url中指定的参数 //获取url中指定参数 function getParam(name) { var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)"); var URL = decodeURI(window.location.searc
阅读全文
摘要:1, <script src="http://res.wx.qq.com/open/js/jweixin-1.2.0.js"></script> <script type="text/javascript"> wx.ready(function() { wx.hideMenuItems({ menu
阅读全文
该文被密码保护。
摘要:js是一门弱语言,它在声明变量时无需确定变量的类型,js在运行时会自动判断。那么如何判断一个变量的类型呢,js提供了typeof运算符,用来检测一个变量的类型。 1. typeof的语法 typeof是一个运算符,有2种使用方式:typeof(表达式)和typeof 变量名,第一种是对表达式做运算,
阅读全文
摘要:1,加入到集合中去 //定义变量var config = {}; // 加入集合 for (var i in obj) { config[i] = obj[i]; } // 调用 config['width'] 2,传入的键值对数据 var media = new VideoF().init({ /
阅读全文

浙公网安备 33010602011771号