时间戳互相转换工具

var no=new Date().getTime(); console.log(no); Date.prototype.format = function(format) { var date = { "M+": this.getMonth() + 1, ...
emer 发布于  2018-2-27 11:26 
emer 发布于  2018-2-26 10:33 

表单序列化添加额外数据

$.ajax({ type: "post", url: "{:u('cart/totalByCard')}?t="+Math.random(9999), data: {'address':address,'delivity':delivity,'payment':payment,$('#card_form').serializ...
emer 发布于  2018-2-12 11:02 

用js获取语音并处理

<!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /></head> <bod...
emer 发布于  2018-1-26 16:43 
emer 发布于  2018-1-25 17:32 

Notification通知

   function popNotice() {         if (Notification.permission == "granted") {             var notification = n...
emer 发布于  2018-1-19 17:08 

node搭建静态express服务器

var express = require('express'); var app = express(); app.use(express.static('./')); var server = app.listen(3000, function () { console.log('Example app listening on port 3000!')...
emer 发布于  2018-1-19 16:35 

js操作cookie cookie.js

/*设置cookie*/ function setCookie(name, value, days){ if(days == null || days == ''){ days = 300; } var exp  = new Date(); exp.setTime(exp.getTime() + days*24*60*60*10...
emer 发布于  2018-1-15 15:24 

js检测用户是否打开调试工具(chrome)

(function(){ var re=/x/; var i=0; console.log(re); re.toString=function(){ window.close(); return '第'+(++i)+'次打开控制台'; } })();
emer 发布于  2018-1-2 17:35 
emer 发布于  2018-1-2 15:03