会员
周边
众包
新闻
博问
闪存
赞助商
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
艾礼富
博客园
首页
新随笔
联系
管理
订阅
2018年6月13日
JavaScript 原型es6写法
摘要: class Point{ } Object.assign方法可以很方便地一次向类添加多个方法。
阅读全文
posted @ 2018-06-13 19:44 艾礼富
阅读(132)
评论(0)
推荐(0)
2018年3月22日
webpack 安装总结
摘要: 安装成功后,package.json 这个文件会多出一行 "html-webpack-plugin": "^2.30.1",,如下所示: webpack.config.js 内容大约是下面这样的:
阅读全文
posted @ 2018-03-22 11:21 艾礼富
阅读(106)
评论(0)
推荐(0)
2018年3月19日
webpack 报错信息应该处理的方式
摘要: You may need an appropriate loader to handle this file type. 意思是webpack需要是个插件来出来这个类型的文件! 当安装node-sass处理scss文件的时候,会报错,处理方法是先全局使用sudo npm install -g --u
阅读全文
posted @ 2018-03-19 10:21 艾礼富
阅读(169)
评论(0)
推荐(0)
2018年1月22日
传参数限制字符串。
摘要: // return obj { length: 字节长度, limitStr: 限定的字符串(字节长度小于等于intVal) } function getStringByteInfo ( string, intVal ) { var str = $.trim(string) || '', lengt
阅读全文
posted @ 2018-01-22 14:51 艾礼富
阅读(167)
评论(0)
推荐(0)
2018年1月15日
ajax传递参数解码
摘要: document.write(unescape("\u62db\u8d22\u7ae5\u5b50"))
阅读全文
posted @ 2018-01-15 16:10 艾礼富
阅读(126)
评论(0)
推荐(0)
添加class名字
摘要: var classVal = document.getElementById("id").getAttribute("class"); //删除的话 classVal = classVal.replace("someClassName",""); document.getElementById("i
阅读全文
posted @ 2018-01-15 14:57 艾礼富
阅读(166)
评论(0)
推荐(0)
2018年1月8日
网页中需要用的一些原型方法
摘要: $.fn.extend({ propAttr: $.fn.prop || $.fn.attr, _oldFocus: $.fn.focus,//为避免与jQuery ui冲突导致死循环,这里不要取名为'_focus' //设置元素焦点(delay:延迟时间) focus: function( del
阅读全文
posted @ 2018-01-08 09:55 艾礼富
阅读(151)
评论(0)
推荐(0)
2018年1月6日
js获取浏览器的高度
摘要: 有三种方法能够确定浏览器窗口的尺寸(浏览器的视口,不包括工具栏和滚动条)。 对于Internet Explorer、Chrome、Firefox、Opera 以及 Safari: window.innerHeight - 浏览器窗口的内部高度 window.innerWidth - 浏览器窗口的内部
阅读全文
posted @ 2018-01-06 09:59 艾礼富
阅读(1853)
评论(0)
推荐(0)
expot输出函数的方法
摘要: 面比较一下默认输出和正常输出。 // 第一组export default function crc32() { // 输出 // ...} import crc32 from 'crc32'; // 输入 // 第二组export function crc32() { // 输出 // ...};
阅读全文
posted @ 2018-01-06 09:29 艾礼富
阅读(197)
评论(0)
推荐(0)
2018年1月5日
Props 验证使用 propTypes,它可以保证我们的应用组件被正确使用
摘要: React.createClass({ propTypes: { // 可以声明 prop 为指定的 JS 基本数据类型,默认情况,这些数据是可选的 optionalArray: React.PropTypes.array, optionalBool: React.PropTypes.bool, o
阅读全文
posted @ 2018-01-05 13:43 艾礼富
阅读(243)
评论(0)
推荐(0)
下一页
公告
点击右上角即可分享