[12,4,16,3].sort(function() {
return 0.5 - Math.random();
}); // [12, 16, 3, 4]
Date(1332446400000+0300)
var time = new Date(1332446400000+0300); // "Fri Jul 22 2016 16:28:57 GMT+0300 (MSK)"
time.getDate(); // 22
form(name='cardAdd')
input(class='title' name='title' type='text' value='')
i = 0
console.time 'time'
while i++ < 1000000
document.forms.cardAdd.title.value # ~ 3100 ms
document.querySelector('.title').value # ~ 2000 ms
console.timeEnd 'time'
form
input(type='submit')
$(document).on 'submit', 'form', ->
$.ajax
type: 'POST'
url: '/send'
data: { test1: 'send', test2: 'send2' }
Node:
bodyParser = require 'body-parser'
app.use bodyParser.urlencoded { extended: false }
app.use bodyParser.json()
app.post '/send', (req, res) ->
console.log 'req.body ', req.body