2
How do I make an 2?
What is a 2? How do you make a 2? This script and codes were developed by Lichi Chen on 18 October 2022, Tuesday.
2 - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>2</title> <link rel="stylesheet" href="css/style.css">
</head>
<body> <h1>Choices of City to Travel</h1>
<div id="one" class="pinkback"> Choice one
</div>
<div id="two" class="lightgreenback"> Choice two
</div>
<p> <input type = "button" value = "color change" onclick = "changeColor()"> <input type = "button" value = "Text change" onclick = "changeText()"> <input type = "button" value = "Style and Color change" onclick = "changeStyleNColor()">
</p>
<p id="lol"></p> <script src="js/index.js"></script>
</body>
</html>
2 - Script Codes CSS Codes
h1 { font-size: 30pt; color: rgb(0, 0, 255); front-family: arial;
}
div { font-size: 15pt; Border: 10px outset; Padding: 5pt; Margin: 20pt;
}
h1 { font-size: 30pt; color: rgb(0, 0, 255); front-family: arial;
}
div { font-size: 15pt; Border: 10px outset; Padding: 5pt; Margin: 20pt;
}
.pinkback { background-color: pink;
}
.lightgreenback { background-color: lightgreen;
}
.blueback { background-color: blue;
}
.purpleback { background-color: purple;
}
.Red { color: blue;
}
.orange { color: orange
}
2 - Script Codes JS Codes
function changeColor() { var c1 = document.getElementById("one"); var c2 = document.getElementById("two"); c1.className = "blueback"; c2.className = "purpleback";
}
function changeText() { var t1 = document.getElementById("one"); var t2 = document.getElementById("two"); t1.innerHTML = "选择 1"; t2.innerHTML = "选择 2";
}
function changeStyleNColor() { var sc1 = document.getElementById("one"); var sc2 = document.getElementById("two"); sc1.className = "Red"; sc2.className = "orange"; sc1.innerHTML = "选择 1"; sc2.innerHTML = "选择 2";
}
Developer | Lichi Chen |
Username | chenlichiclc |
Uploaded | October 18, 2022 |
Rating | 3 |
Size | 1,975 Kb |
Views | 18,216 |
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 |
1 | 1,885 Kb |
Draft | 2,161 Kb |
3 | 1,905 Kb |
My Interests Page | 2,331 Kb |
Week 3 | 2,287 Kb |
The Filter Page-3 | 2,033 Kb |
Color chooser practice-1 | 1,730 Kb |
Color chooser practice-2 | 1,887 Kb |
The Filter Page | 3,026 Kb |
Upload and Display | 2,022 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 |
A Pen by Dalton Liu | Liudalton | 12,437 Kb |
CSS Gem Badge | Orchard | 3,335 Kb |
JQuery AJAX reddit Exercise | Btholt | 1,777 Kb |
404 Page | Saransh | 2,666 Kb |
Wrap_Test | Mscfourn | 7,503 Kb |
CSS-Flexbox-Demo | Sstiglets | 1,709 Kb |
Mobile first social buttons with no iframe | Alistairtweedie | 3,158 Kb |
Flexbox slider | Rendro | 3,459 Kb |
Parallax.js | Zmeeey5 | 2,330 Kb |
Elon Musk - Tribute Page - FreeCodeCamp | Yunnimun | 8,615 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!