-1
我需要你的幫助:-)程序不能識別號碼中的數字輸入
下面的代碼:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Der Einmaleins - Trainer</title>
<link href = "style.css" type = "text/css" rel = "stylesheet">
<!--<script src = "script1m1.js"></script>-->
</head>
<body>
<h1>Der Einmaleins - Trainer</h1>
<button type="button" onclick = "start();">Start</button>
<!--<button type = "button" onclick = "fertig();">Fertig!</button>-->
<input id = "erginput" type = "number" >
<!--<label id = "rn1"></label>
<label id = "multiplication"></label>
<label id = "rn2"></label>
<br>-->
<label id = "feedback"></label>
</body>
<script>
function start(){
var ergebnis = document.getElementById("erginput").innerHTML;
document.getElementById("feedback").innerHTML = ergebnis;
}
</script>
</html>
的問題:當我輸入的號碼設定一個號碼,點擊開始,號碼不顯示。
在此先感謝!
吉W¯¯
閱讀[the documetation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement)始終有用。 – Teemu