07 2018 档案

摘要:1.str="<p>我是桃子&nbsp;我是梨子<p>"var text=document.createElement("div"); text.innerHTML=str; text.innerText 则是转译后标签里的内容 2.str="<p>我是桃子&nbsp;我是梨子<p>" 内容为: s 阅读全文
posted @ 2018-07-31 15:22 米牙 阅读(2561) 评论(0) 推荐(0)
摘要:1.call 3.bind和call的区别 bind:1.改变函数作用域 2.返回一个新函数 eg: call:执行函数 阅读全文
posted @ 2018-07-13 13:25 米牙 阅读(172) 评论(0) 推荐(0)
摘要:1.获取地址栏后面某一个参数的值 function GetQueryString(name) { var reg = new RegExp("(^|&)"+ name +"=([^&]*)(&|$)"); var r = window.location.search.substr(1).match( 阅读全文
posted @ 2018-07-09 11:19 米牙 阅读(2911) 评论(0) 推荐(0)
摘要:1.node -v 检查是否有node环境 2.npm install anywhere -g 利用node安装搭建本地服务器 3.在要看的目录下利用git运行命令行 anywhere 在补全链接就可在移动端打开 如果不行需要配置npm全局的环境变量 阅读全文
posted @ 2018-07-05 19:03 米牙 阅读(144) 评论(0) 推荐(0)
摘要:1. 全局安装 gulp:npm install --global gulp2.作为项目的开发依赖(devDependencies)安装:npm install --save-dev gulp3.在项目根目录下创建一个名为 gulpfile.js 的文件:var gulp = require('gu 阅读全文
posted @ 2018-07-03 11:24 米牙 阅读(194) 评论(0) 推荐(0)
摘要:1.效果图: 2.html 阅读全文
posted @ 2018-07-02 13:13 米牙 阅读(405) 评论(0) 推荐(0)