Javascript Welcome
How do I make an javascript welcome?
A simple javascript code that greets the user with a different greeting, depending on the time of day.. What is a javascript welcome? How do you make a javascript welcome? This script and codes were developed by Peter Lewicki on 03 September 2022, Saturday.
Javascript Welcome - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Javascript Welcome</title>
</head>
<body> <script src="js/index.js"></script>
</body>
</html>
Javascript Welcome - Script Codes JS Codes
//setting up time and date variables
var today = new Date();
var time = today.getHours();
var greeting;
//code below sees what time it is and spits back greeting
if (time > 18) { greeting = 'Good Evening!';
} else if (time> 12) { greeting = 'Good Afternoon!';
} else if (time > 0) { greeting = 'Good Morning!';
} else {greeting = 'Welcome!'; }
document.write('<h3>' + greeting + '</h3>');
Developer | Peter Lewicki |
Username | peterlewicki |
Uploaded | September 03, 2022 |
Rating | 3 |
Size | 1,573 Kb |
Views | 48,576 |
Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!
Name | Size |
A Pen by Peter Lewicki | 1,512 Kb |
HTML5 Canvas exercise | 1,803 Kb |
Basic JS rock paper scissors games | 1,597 Kb |
Football goal list | 2,475 Kb |
Basic Fixed Width Layout Template | 1,786 Kb |
Udemy Bootstrap Grid System Exercise | 1,504 Kb |
Bootstrap navbar practice | 2,181 Kb |
GetElementById exercise | 1,717 Kb |
Boilerplate WebForm | 1,948 Kb |
TIC TAC TOE GAME | 1,546 Kb |
Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!
Name | Username | Size |
TestTube CSS | EZPK | 2,710 Kb |
Part 19 Bootstrap split button dropdown | Venkatesha | 1,601 Kb |
Count up | Alanshortis | 2,391 Kb |
Google Maps API Ground Overlay | Boycetrus | 2,961 Kb |
3D-box | Parthviroja | 2,346 Kb |
Draggable directive | YahyaKacem | 2,277 Kb |
CSS3 keyframe onload animation. | Samueljseay | 1,706 Kb |
Minimal Material Design Form Input | Koenigsegg1 | 3,076 Kb |
Scroll using CSS | Casperovic | 2,159 Kb |
Responsive Pricing Table | Jeremycaris | 2,690 Kb |
Surf anonymously, prevent hackers from acquiring your IP address, send anonymous email, and encrypt your Internet connection. High speed, ultra secure, and easy to use. Instant setup. Hide Your IP Now!