Color chooser practice-2
How do I make an color chooser practice-2?
What is a color chooser practice-2? How do you make a color chooser practice-2? This script and codes were developed by Lichi Chen on 18 October 2022, Tuesday.
Color chooser practice-2 - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>color chooser practice-2</title> <link rel="stylesheet" href="css/style.css">
</head>
<body> <h1>Canvas Element</h1>
<canvas id="one"></canvas>
<p> <input type = "button" value = "black" onclick = "doblack()"> <input id = "clr" type = "color" value = "#0000FF" onclick = "docolor()"> <input id = "sldr" type = "range" min = "0" max = "100" value = "0" oninput = "dosquare()">
</p> <script src="js/index.js"></script>
</body>
</html>
Color chooser practice-2 - Script Codes CSS Codes
canvas { width: 200px; height: 100px; margin: 20px;
}
Color chooser practice-2 - Script Codes JS Codes
function doblack() { var c1 = document.getElementById("one"); c1.style.backgroundColor = "black";
}
function docolor() { var c1 = document.getElementById("one"); var colorinput = document.getElementById("clr"); var color = colorinput.value; c1.style.backgroundColor = color;
}
function dosquare() { var sizeinput = document.getElementById("sldr"); var size = sizeinput.value; var c1 = document.getElementById("one"); var ctx = c1.getContext("2d"); ctx.clearRect(10,10,c1.width,c1.height); ctx.fillStyle = "yellow"; ctx.fillRect (10,10,size,size);
}
Developer | Lichi Chen |
Username | chenlichiclc |
Uploaded | October 18, 2022 |
Rating | 3 |
Size | 1,887 Kb |
Views | 16,192 |
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 |
Upload and Display | 2,022 Kb |
Color chooser practice-1 | 1,730 Kb |
1 | 1,885 Kb |
3 | 1,905 Kb |
My Interests Page | 2,331 Kb |
2 | 1,975 Kb |
The Filter Page-3 | 2,033 Kb |
Week 3 | 2,287 Kb |
Draft | 2,161 Kb |
The Filter Page | 3,026 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 |
STIKHOI | Denmch | 7,122 Kb |
Countdown Timer | Massiebn | 3,001 Kb |
IPhone5S SVG Space Grey | Onlinechris | 75,035 Kb |
Particle Motion trajectories | Sniejadlik | 5,899 Kb |
Toggling Divs with jQuery | Yying6 | 1,967 Kb |
Product item | Mymahesh11 | 2,256 Kb |
Lazy Load for Background Images | The_ruther4d | 2,977 Kb |
SVG Scalable Text | Said_FD | 1,451 Kb |
RPG Style Text Dialogue | Odylic | 2,635 Kb |
Tail rose iris lined | Kbrtrm | 1,846 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!