Nová ukázka
Reset
Načíst z URL
Uložit a získat odkaz
Nevyplňujte
Napiště „nejsem robot“
▶
Přepnout zobrazení
Výsledek
<!DOCTYPE html> <html> <head> <title>String to Number Conversion</title> </head> <body> <input type="text" id="numberInput" placeholder="Enter a number"> <button onclick="calculate()">Calculate</button> <p id="result"></p> <script> function calculate() { let input = document.getElementById("numberInput").value; let convertedNumber = Number(input); let result = convertedNumber + 10; document.getElementById("result").textContent = "Result: " + result; } </script> </body> </html>
HTML
Autoformát
Standardní režim
Mobilní zobrazení
CSS
Autoformát
CSS reset
Až na konci
J
ava
S
cript
Autoformát
jQuery
Umístění JS
window.onload
</head>
</body>