摘要: this 的工作原理 JavaScript 有一套完全不同于其它语言的对 this 的处理机制。 在五种不同的情况下 ,this 指向的各不相同。 第一种:全局范围内 this; 当在全部范围内使用 this,它将会指向全局对象window。 第二种:函数调用 foo(); 这里 this 也会指向 阅读全文
posted @ 2016-08-05 15:58 lhy031 阅读(250) 评论(0) 推荐(1) 编辑
摘要: gulp例子:https://github.com/Aquarius1993/gulpDemo 淘宝镜像:$ npm install -g cnpm --registry=https://registry.npm.taobao.org 一 入门: npm: node package manager( 阅读全文
posted @ 2016-08-05 15:51 lhy031 阅读(1974) 评论(0) 推荐(0) 编辑
摘要: /****************************************************************************** 数据类型判断 - typeof *******************************************************************************/ console.log('数据类型判断 - ... 阅读全文
posted @ 2016-08-05 15:50 lhy031 阅读(209) 评论(0) 推荐(0) 编辑
摘要: //引入包 <script type="text/javascript" src='../template.js'></script> //定义一个有ID的script标签: <script id='tem' type="text/html"> <h4>{{name}}</h4> <ul> {{ea 阅读全文
posted @ 2016-08-05 15:49 lhy031 阅读(200) 评论(0) 推荐(0) 编辑
摘要: 安装 在服务器端最容易的安装方式就是通过 npm (node.js 的包管理器),方法如下:$ npm install -g less 命令行用法 安装 Less 后,就可以在命令行上调用 Less 编译器了,如下: $ lessc styles.less 这将输出编译之后的 CSS 代码到 std 阅读全文
posted @ 2016-08-05 15:48 lhy031 阅读(250) 评论(0) 推荐(0) 编辑
摘要: js阻止冒泡行为: if(e.stopPropagation) { //W3C阻止冒泡方法 e.stopPropagation(); } else { e.cancelBubble = true; //IE阻止冒泡方法 } JQuery 提供了两种方式来阻止事件冒泡。 方式一: event.stop 阅读全文
posted @ 2016-08-05 15:47 lhy031 阅读(266) 评论(0) 推荐(0) 编辑
摘要: 用法一:github上下载包:https://github.com/aui/artDialog seajs方法使用 <!doctype html> <html lang="zh"> <head> <meta charset="UTF-8"> <title>test</title> <style> b 阅读全文
posted @ 2016-08-05 15:46 lhy031 阅读(359) 评论(0) 推荐(0) 编辑
摘要: 一、Compass是什么? 简单说,Compass是Sass的工具库(toolkit)。 Sass本身只是一个编译器,Compass在它的基础上,封装了一系列有用的模块和模板,补充Sass的功能。它们之间的关系,有点像Javascript和jQuery、Ruby和Rails、python和Djang 阅读全文
posted @ 2016-08-05 15:45 lhy031 阅读(365) 评论(0) 推荐(0) 编辑
摘要: 兼容ie8 <!--[if IE 8]> <script src="https://cdnjs.cloudflare.com/ajax/libs/es5-shim/4.0.5/es5-shim.min.js"></script> <style> .ng-hide { display: none !i 阅读全文
posted @ 2016-08-05 15:41 lhy031 阅读(985) 评论(0) 推荐(0) 编辑
摘要: JSON: 这个为什么会变成“cc”而不是d.substring(dot+1);的值? 解决: var jsonsub = {}; jsonsub[cc] = e; arrnew.push(jsonsub); parse用于从一个字符串中解析出json对象,如 var str = '{"name": 阅读全文
posted @ 2016-08-05 15:40 lhy031 阅读(206) 评论(0) 推荐(0) 编辑
摘要: html: <table class="table table-hover table-responsive main-list" id="columntable"> <tr> <th class="">教材名称/章名称/节名称/单元名称/知识点名称</th> <th class="text-cen 阅读全文
posted @ 2016-08-05 15:39 lhy031 阅读(1217) 评论(0) 推荐(0) 编辑
摘要: 安装git 添加系统环境变量:计算机 右键 属性 高级系统设置 环境变量 系统环境变量配置 编辑path C:\Program Files (x86)\Git\cmd 1.右键 git bash 2. ssh-keygen -t rsa -C "邮箱地址" 邮箱地址随便 3.然后把生成的id_rsa 阅读全文
posted @ 2016-08-05 15:37 lhy031 阅读(186) 评论(0) 推荐(0) 编辑
摘要: hosts文件地址:C:\Windows\System32\drivers\etc SVN下载地址:<br> VisualSVN:http://www.visualsvn.com/server/download<br><br> TortoiseSVN:http://tortoisesvn.net/d 阅读全文
posted @ 2016-08-05 15:36 lhy031 阅读(218) 评论(0) 推荐(0) 编辑
摘要: 打开..\wamp\bin\apache\apache2.4.9\conf\httpd.conf配置文件, <Directory "c:/wamp/www/"> # # Possible values for the Options directive are "None", "All", # or 阅读全文
posted @ 2016-08-05 15:35 lhy031 阅读(412) 评论(0) 推荐(0) 编辑
摘要: grunt例子:https://github.com/Aquarius1993/gruntDemo 1、前提是已经有npm(可以通过安装nodejs实现) 2、 npm update -g npm 更新npm 3、安装 CLI npm isntall -g grunt-cli 4、 编写GRuntf 阅读全文
posted @ 2016-08-05 15:34 lhy031 阅读(258) 评论(0) 推荐(0) 编辑
摘要: webpack例子:https://github.com/Aquarius1993/webpackDemo 安装: webpack , webpack-dev-server 1.如何在使用webpack-dev-server的过程中,同时生成文件? 暂时没有解决,说是解决不了 2.怎样实现baseU 阅读全文
posted @ 2016-08-05 15:31 lhy031 阅读(1971) 评论(0) 推荐(0) 编辑
摘要: // 获取地址 function getObjectURL(file) { var url = null ; if (window.createObjectURL!=undefined) { // basic url = window.createObjectURL(file) ; } else i 阅读全文
posted @ 2016-08-05 15:30 lhy031 阅读(537) 评论(0) 推荐(0) 编辑
摘要: arryAll.forEach(function(e){ alert(e); }) IE兼容的foreach if (!Array.prototype.forEach) { Array.prototype.forEach = function(callback, thisArg) { var T, 阅读全文
posted @ 2016-08-05 15:27 lhy031 阅读(193) 评论(0) 推荐(0) 编辑
摘要: 箭头函数: <script> var single = a => a; console.log(single('一个参数')); var log = () => { console.log('没有参数需要用小括号括起来'); }; log(); var add = (a,b) => a+b; con 阅读全文
posted @ 2016-08-05 15:25 lhy031 阅读(257) 评论(0) 推荐(0) 编辑
摘要: : 引入 <script src="//code.jquery.com/jquery-1.9.1.js"></script> <script src="//code.jquery.com/ui/1.10.4/jquery-ui.js"></script> <tbody id="sortable "> 阅读全文
posted @ 2016-08-05 15:23 lhy031 阅读(259) 评论(0) 推荐(0) 编辑