GetElementById exercise
How do I make an getelementbyid exercise?
What is a getelementbyid exercise? How do you make a getelementbyid exercise? This script and codes were developed by Peter Lewicki on 03 September 2022, Saturday.
GetElementById exercise - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>getElementById exercise</title>
</head>
<body> <h1 id="myName">Peter</h1>
<hr>
<p id="aboutMe"><em>I'm learning to build dynamic web pages with Javascript and HTML<em></p> <hr> <h2>Here are some things I like</h2> <p>Cool, cool stuff</p> <li id="firstThing">Old books</li> <li id="secondThing">Europe and its Lifestyle</li> <li id="thirdThing">Nice Shoes</li> </ul> <button id="changeList" type="button"> Change your list </button> <script src="js/index.js"></script>
</body>
</html>
GetElementById exercise - Script Codes JS Codes
var item1;
var item2;
var item3;
document.getElementById("changeList").onclick = newList;
function newList() { item1 = prompt("Enter a new first thing: "); item2 = prompt("Enter a new second thing: "); item3 = prompt("Enter a new third thing: "); updateList();
}
function updateList () { document.getElementById("firstThing").innerHTML = item1; document.getElementById("secondThing").innerHTML = item2; document.getElementById("thirdThing").innerHTML = item3; }
Developer | Peter Lewicki |
Username | peterlewicki |
Uploaded | September 03, 2022 |
Rating | 3 |
Size | 1,717 Kb |
Views | 32,384 |
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 |
Minimalist CSS Blog | 2,066 Kb |
Udemy Bootstrap Grid System Exercise | 1,504 Kb |
Bootstrap navbar practice | 2,181 Kb |
Football goal list | 2,475 Kb |
Basic Fixed Width Layout Template | 1,786 Kb |
Javascript Welcome | 1,573 Kb |
TIC TAC TOE GAME | 1,546 Kb |
A Pen by Peter Lewicki | 1,512 Kb |
Basic JS rock paper scissors games | 1,597 Kb |
Typing Test | 3,371 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 |
Use the Twitchtv JSON API | Roksanaop | 3,561 Kb |
Scoreboard.js basic usage | Tbleckert | 1,733 Kb |
Twinner Spinner II | Katydecorah | 2,974 Kb |
Pictos font library from CodePen | Jstam | 3,790 Kb |
Pure CSS Read More Arrow | Zephyr | 1,747 Kb |
Simple Carousel Pure CSS | Dangvanthanh | 4,080 Kb |
Playing with transition timing | Mattgrosswork | 1,993 Kb |
Front in Aracaju Logo Pure CSS | Shankarcabus | 2,581 Kb |
Konami Code Easter Egg | Teolitto | 3,051 Kb |
Wikipedia Viewer | Thomasvaeth | 2,549 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!