this code won't seem to run, even though I can't find anything wrong with it. It's probably something stupid, but I'm a beginner, so please don't judge :)
P.S. It's supposed to grab the user inputs and checkbox options selected, and then return the correct Chinese output (formal or informal).
<html>
<form>
Formal:<input id="check1" type="checkbox"></input><br>
Informal:<input id="check2" type="checkbox"></input><br>
Num. 1 Char:<input id="a" type="number" value=" "></input><br>
Num. 2 Char:<input id="b" type="number" value=" "></input><br>
Num. 3 Char:<input id="c" type="number" value=" "></input><br>
<button onclick="myFunction">Make Chinese!</button>
</form>
<h1 id="answer">Answer will show up here</h1>
<script type="text/javascript">
let aa = (document.getElementById('a').value);
let bb = (document.getElementById('b').value);
let cc = (document.getElementById('c').value);
function myFunction() {
if (document.getElementById('check1').checked) {
document.getElementById('answer').innerHTML = (aa+"元"+bb+"角"+cc+"分");
}else{
document.getElementById('answer').innerHTML = (aa+"块"+bb+"毛"+cc+"分");
}
}
</script>
</html>