JavaScript function does not output anything on html file -
hey stupid question here. code:
function showday(){ var t = newdate(); var dayz = ["sunday", "monday", "tuesday", "wednesday", "thursday", "friday", "saturday"]; document.getelementbyid('kappa').innerhtml = dayz[t.getday()]; }
in html file have want function output. not work. know js file referenced other functions work fine.
any appreciated! sorry being such rookie.
i think looking
<!doctype html> <head> <meta charset="utf-8"> <style> </style> </head> <body> <div id="kappa"> </div> <script> var t = new date(); var dayz = ["sunday", "monday", "tuesday", "wednesday", "thursday", "friday", "saturday"]; document.getelementbyid('kappa').innerhtml = dayz[t.getday()]; </script> </body> </html>
Comments
Post a Comment