0
I have the following script that returns date and time:
function RetornaDataHoraAtual(){
var dNow = new Date();
var localdate = dNow.getDate() + '/' + (dNow.getMonth()+1) + '/' + dNow.getFullYear() + ' ' + dNow.getHours() + ':' + dNow.getMinutes();
return localdate;
}
And an html page (the following) where I call it, in this code snippet (which, when I run, nothing happens - no output is displayed). Where can I be missing?
<div class="container">
<label>Cronômetro de Monitoramento, até a data de <script src="retornaData.js"></script> </label>
<?!= include("grafico"); ?>
<font size="1" face="Verdana"><i><b>Nota:</b> Apenas monitoramentos concluídos(no prazo e fora do prazo) e empacados. </i><u>Excluem-se os que estão em andamento.</u></i></fonte>
</div>
<div class="row">
If I am not mistaken, it is necessary to initialize the function: 'nameFuncao()', it seems that you are only declaring the function inside the script, you need to press play. I could be wrong.
– MagicHat
But when I call the function, inside it, I already have the Return, which returns the variable that stores the date.
– roger roger
The correct is after the statement, no?
– MagicHat