Permalink
Cannot retrieve contributors at this time
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
intro-html/index.html
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
38 lines (35 sloc)
1.18 KB
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>Web Interactivity</title> | |
</head> | |
<body> | |
<script> | |
// Prompt to ask the user what code library they prefer | |
let library = prompt("What code library would you prefer - Vue, React, or jQuery?"); | |
// Display the user's choice | |
if (library.toLowerCase() == "vue") { | |
alert("You chose Vue"); | |
} | |
else if (library.toLowerCase() == "react") { | |
alert("You chose React"); | |
} | |
else if (library.toLowerCase() == "jquery") { | |
alert("You chose jQuery"); | |
} | |
else { | |
alert("Invalid choice"); | |
} | |
// Prompt to ask about the language created for web interactivity | |
let language = prompt("What language was created to add interactivity to the Web?"); | |
// Display the user's input | |
if (language.toLowerCase() == "javascript") { | |
alert("Correct! JavaScript was created to add interactivity to the Web."); | |
} else { | |
alert("You entered: " + language); | |
} | |
</script> | |
</body> | |
</html> |