3
I have a Javascript function that returns today’s date:
function getData(){
var dataAtual = document.getElementsByClassName("dataAtual");
var today = new Date();
var dd = today.getDate();
var mm = today.getMonth() + 1; //January is 0!
var yyyy = today.getFullYear();
if (dd < 10) {
dd = '0' + dd;
}
if (mm < 10) {
mm = '0' + mm;
}
today = dd + '/' + mm + '/' + yyyy;
return (today);
}
I need her to show up on this div:
<tr>
<th scope="row">Data Abertura</th>
<td class="dataAtual">AQUI</td>
</tr>
It needs to be when entering the page, how do I do it?