아래 단락이 작동하지 않는 이유는 무엇입니까?왜 이것이 작동하지 않습니까? 나는 무엇을 잘못 했는가?
<body onload="x()" background=" http://theworldsbestever.s3.amazonaws.com/blog/wp-content/uploads/2013/02/tumblr_inline_mi17k7Afai1qz4rgp.gif"> <font size="32%"><h1 style="font-family: Verdana; color: red; text-align: center"><u>How long is your text?<u></font>
</h1>
<br>
<div style="text-align: center;">
<input style="text-align: center;" id="input1" maxlength="6" placeholder="Enter Some Text">
<br><br>
<button type="button" onclick="x()">Submit</button>
</div>
<p id="textLength2" style="color: white; text-align: center; font-family: verdana;"></p>
<script>
function x() {
var textLength = document.getElementById("input1");
var textLength = textLength.length;
document.getElementById("textLength2").innerHTML = textLength;
}
</script>
</body>
무슨 뜻입니까? –
아래 단락은 입력 필드의 길이를 반환해야하지만 작동하지 않습니다 – Fizzy
"버그를 찾을 수 있습니까?"[스택 오버플로에 대한 좋은 질문이 아닙니다] (http://meta.stackoverflow.com/questions/ 253787/is-there-legal-fix-my-code-questions? cb = 1 # 253788). 문제가 무엇인지 ** 정확하게 설명 해주는 ** ** 특정 문제에 대한 간단한 설명을 제공하십시오. "작동하지 않는다"는 문제는 아니다. –