Conditional Statement in JavaScript

<html> <body> <h3>Conditional using JavaScript child, teen, young,adult, old ,</h3> <p>Enter age: <input type=&quot;number&quot; id=&quot;age&quot;></p> <input type=&quot;button”&quot;value=&quot;CLICK HERE&quot; onclick=”&quot;check()&quot;/> <script> function check() { var ag=document.getElementById(‘age’).value; ag=parseInt(ag); if(Number.isInteger(ag)) { if (ag<=13) …

Conditional Statement in JavaScript Read More

date using JavaScript

<!DOCTYPE html> <html> <body> <h2>Event</h2> <button onclick="document.getElementById(‘fordate’).innerHTML = Date()"> Click to display Date and Time.</button> <p id="fordate"></p> </body> </html> —————————————————————————————————————————————- <html> <body> <script type="text/javascript"> function displayDateTime() { var currentDate = …

date using JavaScript Read More