Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • The setDate() Method in Javascript

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 130
    Comment on it

    To set the day of the month (1-31), we use setDate() method
    Example

    1. <!DOCTYPE html>
    2. <html>
    3. <body>
    4. <h1>Evon technologies</h1>
    5. <p>The Example of setDate() method to set the date of a month</p>
    6.  
    7. <p id="z"></p>
    8.  
    9. <script>
    10. var d = new Date();
    11. d.setDate(23);
    12. document.getElementById("z").innerHTML = d;
    13. </script>
    14.  
    15. </body>
    16. </html>

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Reset Password
Fill out the form below and reset your password: