Ciao, come posso impostare nel codice javascript seguente, l'indirizzo url corrente del sito web?
Codice PHP:
"use strict";function savelike(post_id) {
$.ajax({
type: "POST",
url: "main/savelikes",
data: "post_id=" + post_id,
success: function(response) {
$("#like_" + post_id).html(response + "");
}
}); }