
frontend
fareast_mzh
If something is free, you are the product.
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
虚拟代理实现loading图片预加载
.├── img│└── loading.gif├── index.html├── index.html~└── js ├── myImage.js └── myImage.js~* index.html<!DOCTYPE html><html lang="zh-CN"> <head> <meta...原创 2019-12-13 11:08:03 · 365 阅读 · 0 评论 -
Vue 父子组件传值
页面层级关系<ExamineSection> <ExamineDetail></ExamineDetail> <ExamineCreateView> <CreateView></CreateView> </ExamineCreateView></ExamineSe...原创 2019-10-17 10:34:04 · 379 阅读 · 0 评论 -
常用的正则表达式 regexp 表单验证, 测试表单自动填充 身份证号校验
Javascript 正则表达式** 日期 date/^(\d{4})[-\/](\d{1}|0\d{1}|1[0-2])([-\/](\d{1}|0\d{1}|[1-2][0-9]|3[0-1]))*$/** 邮箱 email/^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/** 身份证号/(...原创 2018-09-19 14:49:56 · 1401 阅读 · 0 评论 -
layui表格id, lay-filter命名 必须以 LAY-table- 开头 layui checkbox 批量删除 table.checkStatus
<div class="layui-card"> <!--<div class="layui-card-header">示例表头</div>--> <div class="layui-card-body"> <table class="layui-hide" id="LAY-table-operat...原创 2018-10-23 11:14:34 · 14552 阅读 · 1 评论 -
javascript 自动触发 按键盘操作 trigger
回车键 keyCode 13HTMLElement.prototype.pressKey = function(code) { var evt = document.createEvent("UIEvents"); evt.keyCode = code; evt.initEvent("keydown", true, true); this.dispatchEvent(evt);}...原创 2018-10-26 15:41:47 · 19235 阅读 · 17 评论 -
javascript addEvent 添加事件
// https://open.alipay.com/developmentAccess/developmentAccess.htm var $ = window.jQuery; (function() { if (!NodeList.prototype.forEach) { NodeList.prototype.forEach = functio...原创 2018-06-19 15:47:00 · 1919 阅读 · 0 评论 -
javascript 兼容浏览器 添加事件, 动态加载js, trigger
/* * Cross-browser helper function to add event handler */ function addEventListener(element, eventType, eventHandler, useCapture) { if (element.addEventListener) { el...原创 2018-11-06 11:56:24 · 628 阅读 · 0 评论 -
第一个ext.js demo
https://www.w3cschool.cn/extjs/extjs_environment_setup.html* 目录结构* index.html<html><head> <meta charset="UTF-8"> <title>ext.js simple</title></head>原创 2018-12-11 16:07:27 · 1178 阅读 · 0 评论 -
vue开发环境配置
* 确认node安装好, npm可用node -vnpm -v * 安装cnpmnpm install -g cnpm --registry=https://registry.npm.taobao.org * 安装vue-clicnpm install -g vue-clivue -V * 创建项目my-vuevue init webp...原创 2018-08-12 09:48:00 · 346 阅读 · 0 评论 -
vue 熟悉项目结构 创建第一个自己的组件
*vue开发环境搭建* 项目入口文件 ./src/main.js// The Vue build version to load with the `import` command// (runtime-only or standalone) has been set in webpack.base.conf with an alias.import Vue from 'vue'...原创 2018-08-12 09:54:00 · 397 阅读 · 0 评论 -
Vue.js城市三级联动
chrome安装Vue插件 访问不了google插件下载源所以安装firefox的Vue插件在浏览器地址栏输入 about:addons安装好之后Vue页面增加了一栏1. 数据库文件district.sql链接: https://pan.baidu.com/s/1fXhquBOyUOlBk5QI1FoPwg 提取码: hm3b 复制这段内容后打开百度网盘手机App...原创 2019-07-15 17:43:22 · 737 阅读 · 0 评论 -
javascript DOM 共同父节点
*查找两个节点的最近的一个共同父节点,可以包括节点自身 input: oNode1 和 oNode2 在同一文档中,且不会为相同的节点function commonParentNode(oNode1, oNode2) { while (oNode1) { if (oNode1.contains(oNode2)) { return oNo...原创 2018-07-01 15:12:00 · 497 阅读 · 0 评论 -
微信小程序 创建自己的第一个小程序
* 成为微信公众平台的开发者注册 https://mp.weixin.qq.com* 登录https://open.weixin.qq.com/* 开发者工具下载https://developers.weixin.qq.com/miniprogram/dev/devtools/download.html?t=18080318* 申请测试号https://develope...原创 2018-08-03 22:45:00 · 525 阅读 · 0 评论 -
页面效果 返回顶部
* 需要的图片 * html<div id="back-to-top" class="back-to-top"> <div class="icon-text"><span>返回顶部</span></div> <div class="icon-arrow&qu原创 2018-08-20 14:04:46 · 1413 阅读 · 0 评论 -
js check all checkbox
tbodyclass="scrollBody">tr>tdclass="col-0">1td>tdclass="col-1">第1集td>tdclass="col-2">200Mtd>tdclass="col-3">ahref="javascript:;">查看详情a>td>tdclass=&原创 2017-02-06 23:07:19 · 1806 阅读 · 0 评论 -
addClass Function
https://css-tricks.com/snippets/javascript/addclass-function/HTMLElement.prototype.hasClass = function(name) { return this.className.match(new RegExp('(\\s|^)' + name + '(\\s|$)'));};HTMLElement.pr...原创 2018-05-08 16:09:39 · 338 阅读 · 0 评论 -
Array.prototype.reduce javascript reduce() 用法
1. Sum all the values of an arrayvar sum = [0,1,2,3].reduce(function(a, c) { return a + c;}, 0);// sum is 6 ES6:let total = [0,1,2,3].reduce( (accumulator, currentValue) => accumulator + ...原创 2018-07-03 19:15:53 · 464 阅读 · 1 评论 -
react 的一些学习资料
* react开发实战 (Pro React)https://github.com/apress/pro-react * react 配置好的环境https://github.com/brickspert/react-familyreact教程https://github.com/brickspert/blog/issues/1react后台管理https://github...原创 2018-08-05 22:16:37 · 387 阅读 · 0 评论 -
vue开发环境搭建
* install node* install cnpmnpm install -g cnpm --registry=https://registry.npm.taobao.org* install vue-clicnpm install -g vue-clivue -V* create project "my-vue"vue init webpack my-v...原创 2018-08-10 14:53:46 · 378 阅读 · 0 评论 -
Typescript ES6
* typescript 中文文档https://www.tslang.cn/docs/home.html* TypeScript-React-Starterhttps://github.com/Microsoft/TypeScript-React-Starter#typescript-react-starter* ECMAScript 6 入门http://es6.ruany...原创 2018-08-06 23:07:00 · 1241 阅读 · 0 评论 -
vue 熟悉项目结构 创建第一个自己的组件
* vue开发环境搭建* 项目入口文件 ./src/main.js// The Vue build version to load with the `import` command// (runtime-only or standalone) has been set in webpack.base.conf with an alias.import Vue from 'vue'...原创 2018-08-11 21:28:12 · 613 阅读 · 0 评论 -
react生命周期
/******************************************* Mounting ***********************************************/* Class constructor constructor(){ super(); this.state={ contacts: [] }; ...原创 2018-08-07 22:12:53 · 308 阅读 · 0 评论 -
封装一个 标签切换 自动轮播 的组件 (移除jQuery) trigger
* index.html<!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <title>tab标签切换 去掉jQuery</title> <link href="css/ta原创 2018-08-08 11:32:52 · 364 阅读 · 0 评论 -
bootstrap 响应式媒体查询
https://getbootstrap.com/docs/3.3/css/@media(min-width:1200px) {}@media(min-width:992px) {}@media(min-width:768px) {}@media(max-width:768px) {}Media queriesWe use the following media queries ...原创 2018-08-15 18:00:09 · 917 阅读 · 0 评论 -
TODO LIST css写出对勾
<!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <title>:after :before</title> <style> li { list-s原创 2018-08-08 18:06:09 · 681 阅读 · 0 评论