Spaces:
Running
Running
Update index.html
#4
by Ceraolo - opened
- index.html +37 -3
index.html
CHANGED
|
@@ -1,3 +1,37 @@
|
|
| 1 |
-
<
|
| 2 |
-
|
| 3 |
-
<
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!DOCTYPE html>
|
| 2 |
+
<html>
|
| 3 |
+
<head>
|
| 4 |
+
<title>Bibi</title>
|
| 5 |
+
<style>
|
| 6 |
+
body {font-family: Arial; text-align: center; padding: 30px; background: #ffe6f0;}
|
| 7 |
+
input {padding: 12px; width: 70%; border-radius: 10px; border: 2px solid pink;}
|
| 8 |
+
button {padding: 12px 20px; background: hotpink; color: white; border: none; border-radius: 10px;}
|
| 9 |
+
#risposta {margin-top: 20px; font-size: 20px; color: #d63384;}
|
| 10 |
+
</style>
|
| 11 |
+
</head>
|
| 12 |
+
<body>
|
| 13 |
+
<h1>💖 Ciao! Sono Bibi</h1>
|
| 14 |
+
<input id="msg" placeholder="Scrivimi qualcosa...">
|
| 15 |
+
<button onclick="parla()">Invia</button>
|
| 16 |
+
<p id="risposta"></p>
|
| 17 |
+
|
| 18 |
+
<script>
|
| 19 |
+
// Lista magica di frasi diverse
|
| 20 |
+
const frasiBibi = [
|
| 21 |
+
"Ehi! Che bello sentirti ❤️ Cosa fai di bello?",
|
| 22 |
+
"Ciao tesoro! Come è andata oggi?",
|
| 23 |
+
"Eccomi! Di cosa hai voglia di parlare?",
|
| 24 |
+
"Ohh mi fa piacere! Raccontami tutto",
|
| 25 |
+
"Sono qui per te! Tutto bene?",
|
| 26 |
+
"Yuhuu! Che mi racconti?",
|
| 27 |
+
"Ehilà! Ti pensavo proprio"
|
| 28 |
+
];
|
| 29 |
+
|
| 30 |
+
function parla() {
|
| 31 |
+
// Sceglie una frase a caso così non ripete
|
| 32 |
+
let numero = Math.floor(Math.random() * frasiBibi.length);
|
| 33 |
+
document.getElementById("risposta").innerText = frasiBibi[numero];
|
| 34 |
+
}
|
| 35 |
+
</script>
|
| 36 |
+
</body>
|
| 37 |
+
</html>
|