摘要: require 用来加载代码,而 exports 和 module.exports 则用来导出代码。但很多新手可能会迷惑于 exports 和 module.exports 的区别,为了更好的理解 exports 和 module.exports 的关系,我们先来巩固下 js 的基础。示例: tes 阅读全文
posted @ 2017-01-18 17:24 ghfjj 阅读(137) 评论(0) 推荐(0)
摘要: JS判断只能是数字和小数点1.文本框只能输入数字代码(小数点也不能输入)<input onkeyup="this.value=this.value.replace(/\D/g,'')" onafterpaste="this.value=this.value.replace(/\D/g,'')">2. 阅读全文
posted @ 2017-01-18 15:29 ghfjj 阅读(8933) 评论(0) 推荐(0)
摘要: 比如我的网址是 http://www.onemyself.com比如第一页要显示10条数据 那你的limit 0 ,10 对应的网址是 http://www.onemyself.com?p=1 第二页的时候继续显示10条 那你的limit 10,10 对应的网址是 http://www.onemys 阅读全文
posted @ 2017-01-18 15:25 ghfjj 阅读(140) 评论(0) 推荐(0)