Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

date object js

var today = new Date();
var year = today.getFullYear();

var element = document.getElementById('main');
element.innerHTML = `<p>Today's date is ${today}</p>`;
Source by htmlcheatsheet.com #
 
PREVIOUS NEXT
Tagged: #date #object #js
ADD COMMENT
Topic
Name
1+5 =