- 博客(9)
- 资源 (13)
- 收藏
- 关注
原创 web 获取select中被选中option的value和text
$('#select-id option:selected').val();$('#select-id option:selected').text();
2016-03-29 10:45:34 2005
原创 web js浮点数保留n位小数
var a = 12.56789; console.log(a.toFixed(n)); //想保留几位小数n就为几
2016-03-28 15:15:50 375
原创 web 复位<select>标签 jQuery用法
HTML是这样的: All Blue Park Portable Classroom A Portable Classroom B Outdoor on Campus building3 Boshton Union Building 123456 Red room Blue Park如何在用jQuery控制选择哪个option呢?试了三种方法:$('#build
2016-03-27 16:41:39 2095
原创 web HTML5的自定义属性data-xxx不能使用大写字母
>var orgId = $('#incpad').data('orgId');//orgId为空var orgId = $('#incpad').data('orgid');//orgId有数据为了从页面中获取数据orgId,我们添加了自定义属性,首先用的是第一种写法data-orgId,发现用jQuery取到的数据为空,于是改为第二种写法data-o
2016-03-25 15:39:32 3382
转载 web PHP判断请求来自PC还是Mobile
private function isMobile() { // 如果有HTTP_X_WAP_PROFILE则一定是移动设备 if (isset ($_SERVER['HTTP_X_WAP_PROFILE'])) { return true; } // 如果via信息含有wap则一定是移动设备,部分服务商会屏蔽该信息
2016-03-22 18:01:44 2524
原创 web Kohana_Exception [ 0 ]: Directory APPPATH/cache must be writable
Kohana_Exception [ 0 ]: Directory APPPATH/cache must be writableKohana_Exception [ 0 ]: Directory APPPATH/logs must be writable需要修改Kohana框架中两个路径的访问权限:applicatio
2016-03-22 11:55:11 1660
原创 web grunt serve启动失败
Warning: Running "compass:server" (compass) task Warning: You need to have Ruby and Compass installed and in your system PATH for this task to work. More info: https://github.com/gruntjs/grunt-co
2016-03-03 16:28:47 2969
原创 web Update node.js & npm on Mac
update node.js:down vote1) Clear NPM's cache:sudo npm cache clean -f2) Install a little helper called 'n'sudo npm install -g n3) Install latest stable NodeJS ve
2016-03-03 15:54:22 1359
Apache配置文件httpd.conf
2015-09-10
新浪微博API提取个人信息
2012-12-08
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人