随笔分类 -  大坑!

摘要:在单页面应用中,会导致,history 跳转两次的情况: 要使用: 代替! 阅读全文
posted @ 2017-09-22 14:13 快乐的咸鱼 阅读(314) 评论(0) 推荐(0)
摘要:浏览器会在跳转时,先将汉字编译成 Unicode,然后跳转,导致hash值改变两次,相当于history 中 加入了两次URL 阅读全文
posted @ 2017-09-22 11:43 快乐的咸鱼 阅读(319) 评论(0) 推荐(0)
摘要:$timeout 会在执行后刷新页面上 与angular 相关的变量,在于jQuery共用修改页面变量时,这很可能会导致刷新跳动的现象: 阅读全文
posted @ 2017-09-21 11:07 快乐的咸鱼 阅读(266) 评论(0) 推荐(0)
摘要:event.preventDefault() 解决按钮多次点击 导致页面变大 阅读全文
posted @ 2017-09-19 17:30 快乐的咸鱼 阅读(382) 评论(0) 推荐(0)
摘要:今天遇到个问题: <a href="#" onclick="history.go(-1)">后退</a> 点击"后退"链接时,在IE,firefix下,history.go(-1)可以起到后退的作用,但在chrome下不起作用,要用history.go(-2)才生效。 后来研究了一下,发现在IE,f 阅读全文
posted @ 2017-09-18 15:38 快乐的咸鱼 阅读(1321) 评论(0) 推荐(0)
摘要:https://github.com/jakubpawlowicz/clean-css-cli https://davidwalsh.name/clean-css 阅读全文
posted @ 2017-09-12 14:44 快乐的咸鱼 阅读(1415) 评论(0) 推荐(0)
摘要:https://www.npmjs.com/package/uglify-es 阅读全文
posted @ 2017-09-06 11:26 快乐的咸鱼 阅读(4372) 评论(0) 推荐(0)
摘要:angular.module('app', []) .controller('ItemController', function($scope, $interval) { // store the interval promise in this variable var promise; // simulated items array ... 阅读全文
posted @ 2017-09-01 20:26 快乐的咸鱼 阅读(944) 评论(0) 推荐(0)
摘要:注意 $scope.$apply 调用时的位置 阅读全文
posted @ 2017-08-28 16:21 快乐的咸鱼 阅读(331) 评论(0) 推荐(0)
摘要:$.ajax: $http: 阅读全文
posted @ 2017-08-15 11:50 快乐的咸鱼 阅读(180) 评论(0) 推荐(0)
摘要:由于angular是在真实dom加载之后,运行,所以jQuery操作dom时,要先于angular添加的元素(如,ng-repeat),所以常常会出现,元素错位,解决办法:添加一个透明的站位元素; 阅读全文
posted @ 2017-08-11 20:00 快乐的咸鱼 阅读(1743) 评论(0) 推荐(0)
摘要:开启缓存 造成的问题: 阅读全文
posted @ 2017-08-11 17:32 快乐的咸鱼 阅读(631) 评论(0) 推荐(0)
摘要:不能使用for-in循环,因为在chrome中输出的顺序 跟其他浏览器不同 阅读全文
posted @ 2017-08-10 17:58 快乐的咸鱼 阅读(193) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2017-08-10 17:10 快乐的咸鱼 阅读(869) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2017-08-08 11:10 快乐的咸鱼 阅读(207) 评论(0) 推荐(0)
摘要:不支持,要换成function的形式 阅读全文
posted @ 2017-08-06 20:40 快乐的咸鱼 阅读(307) 评论(0) 推荐(0)
摘要:js 为了能在移动端通用,要写严格模式: 这里多了个逗号,在pc上浏览器可以通过,但是在手机端就不能。 阅读全文
posted @ 2017-08-06 20:32 快乐的咸鱼 阅读(236) 评论(0) 推荐(0)
摘要:1. httpd.conf 添加: 开启: 在phpinfo里找到: 说明开启成功。 2.httpd-vhosts.conf (开启虚拟主机的情况下) 注意这里的 添加: 3.在网站根目录添加: 例如内容: 4.在php里写: 浏览器显示: 说明.htaccess配置生效 阅读全文
posted @ 2017-08-03 21:47 快乐的咸鱼 阅读(437) 评论(0) 推荐(0)
摘要:1、修改http.conf 找到,#Include conf/extra/httpd-vhosts.conf,修改为(有的版本服务器,默认是开启的): 2、配置httpd-vhosts.conf文件,要根据里面自带的格式配置,不然很可能出错: 3、配置hosts: C:\Windows\System 阅读全文
posted @ 2017-07-30 15:02 快乐的咸鱼 阅读(435) 评论(0) 推荐(0)