se non usi browsers compatibili (come FireFox, Opera, altri) hai la JSL (in sign)codice:function scrivi_data_odierna(tipo) { // JavaScript 1.6 var now = new Date(), data = !tipo ? [now.getDate(), now.getMonth(), now.getFullYear()] : [now.getMonth(), now.getDate(), now.getFullYear()]; return data.map(function(e){return e < 10 ? "0".concat(e) : e}).join("/"); }![]()