res.writeHead(200, {
'Access-Control-Allow-Origin': '*',
// 'Access-Control-Allow-Credentials': true
});
var express = require('express'),
cors = require('cors'),
app = express();
app.use(cors());
// или
app.use(cors({
origin: true,
credentials: true
}));
<div class="row">
<div class="col-md-8">
<div class="row">
<div class="col-md-6">Projects</div>
<div class="col-md-6">Fondue</div>
</div>
<div class="row">
<div class="col-md-4">Louis XX</div>
<div class="col-md-8">View project</div>
</div>
</div>
<div class="col-md-4">
<div class="col-md-12">Potter</div>
<div class="col-md-12">Tabano</div>
<div class="col-md-12">Fiji</div>
</div>
</div>
var self = this;
$.post(
"/post/vote",
{
id: $(this).parents('.news_com_right').attr('data-attr'),
value: $(this).attr('data-attr')
},
function(respond) {
console.log(self);
}
);