function Datein() { var selectedDate = new Date(); var displaydate = document.getElementById('timein') if (displaydate) { displaydate.textContent = selectedDate; } } code example
Example: function Datein() { var selectedDate = new Date(); var displaydate = document.getElementById('timein') if (displaydate) { displaydate.textContent = selectedDate; } }
function Datein() {
var selectedDate = new Date();
var displaydate = document.getElementById('timein')
if (displaydate) {
displaydate.textContent = selectedDate;
}
}