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 |
TIC TAC TOE GAME | 1,546 Kb |
Minimalist CSS Blog | 2,066 Kb |
A Pen by Peter Lewicki | 1,512 Kb |
Football goal list | 2,475 Kb |
GetElementById exercise | 1,717 Kb |
Basic JS rock paper scissors games | 1,597 Kb |
Bootstrap navbar practice | 2,181 Kb |
Typing Test | 3,371 Kb |
Basic Fixed Width Layout Template | 1,786 Kb |
Udemy Bootstrap Grid System Exercise | 1,504 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 |
Base64 SVG Me | MrBambule | 44,786 Kb |
HTML5 Breakout | Jaysalvat | 4,873 Kb |
Box-sizing | Elad2412 | 1,572 Kb |
CSS Variables | Jdsteinbach | 4,759 Kb |
A Pen by utcwebdev | Utcwebdev | 2,856 Kb |
Price table | Serluk | 5,928 Kb |
Fluid Grid 12 | Alexoliverwd | 2,309 Kb |
BSP Dungeon Generation | Xgundam05 | 5,326 Kb |
Getting Started | Viblast | 1,500 Kb |
Sassy Buttons | Elyseholladay | 2,299 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!