yellowelephant Posted December 20, 2014 Share Posted December 20, 2014 Hello!Please, why does first code work and others not?many thanks!!!<!DOCTYPE html><html><body><p id="demo"></p><script>document.getElementById("demo").innerHTML = Date();</script></body></html>...and THIS does not work?<!DOCTYPE html><html><body><p id="demo"></p><script>document.getElementById("demo").innerHTML = getDate();</script></body></html>..and THIS also not???<!DOCTYPE html><html><body><p id="demo"></p><script>document.getElementById("demo").innerHTML = getDay();</script></body></html>MANY THANKS!!! Quote Link to comment Share on other sites More sharing options...
Floriaen Posted December 21, 2014 Share Posted December 21, 2014 Why not? :^) ...the solution is quite simple:Date() exists, getDate() and getDay() not. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.