44 lines
988 B
HTML
44 lines
988 B
HTML
<!DOCTYPE html>
|
|
<html lang="it">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<title>Cambia Colore Testo</title>
|
|
<style>
|
|
body {
|
|
font-family: Arial, sans-serif;
|
|
padding: 20px;
|
|
}
|
|
textarea {
|
|
width: 100%;
|
|
height: 150px;
|
|
font-size: 16px;
|
|
margin-bottom: 10px;
|
|
}
|
|
select, button {
|
|
padding: 8px;
|
|
font-size: 16px;
|
|
margin-right: 10px;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
|
|
<h2>Cambia il colore del testo</h2>
|
|
|
|
<textarea id="textArea" placeholder="Scrivi qui il tuo testo..."></textarea><br>
|
|
|
|
<select id="colorSelect">
|
|
<option value="black">Nero</option>
|
|
<option value="red">Rosso</option>
|
|
<option value="blue">Blu</option>
|
|
<option value="green">Verde</option>
|
|
<option value="purple">Viola</option>
|
|
<option value="orange">Arancione</option>
|
|
<option value="yellow">Giallo</option>
|
|
</select>
|
|
|
|
<button onclick="esercizio1()">Applica Colore</button>
|
|
<script src="esercizi.js"></script>
|
|
</body>
|
|
</html>
|