1
innerHTML
의 <input>
에 액세스하는 것이 비어있는 이유는 무엇이며이를 수정하려면 어떻게해야합니까?입력 요소의 값에 액세스
전체 HTML : 나는 유성을 사용하고
<head>
<title>Scientific Calculator</title>
</head>
<body>
<div class="calculator">
{{> calculator}}
</div>
</body>
<template name="console">
<input id="console" type="text" value="0" />
</template>
<template name="buttons">
<input type="button" value="7" class="button 7" />
<input type="button" value="8" class="button 8" />
<input type="button" value="9" class="button 9" />
<input type="button" value="A" class="button A" />
<input type="button" value="B" class="button B" />
<input type="button" value="C" class="button C" />
<input type="button" value="4" class="button 4" />
<input type="button" value="5" class="button 5" />
<input type="button" value="6" class="button 6" />
<input type="button" value="A" class="button" />
<input type="button" value="B" class="button" />
<input type="button" value="C" class="button" />
<input type="button" value="1" class="button 1" />
<input type="button" value="2" class="button 2" />
<input type="button" value="3" class="button 3" />
<input type="button" value="A" class="button" />
<input type="button" value="B" class="button" />
<input type="button" value="C" class="button" />
<input type="button" value="0" class="button 0" />
</template>
<template name="adminButtons">
</template>
<template name="calculator">
<!-- make the interface for the Calculator -->
{{>console}}
{{>buttons}}
{{>adminButtons}}
</template>
이
내 응용 프로그램의 스크린 샷이다.
감사! 그 정의되지 않은 라인은 무엇입니까? –
''요소는 빈 요소입니다 (예 : ''이라고 말하면 HTML로 작성한 요소)이므로 내부에 HTML이 없습니다. – APerson