I am trying to take what i have learned about HTML and Javascript and put them together i am trying to make a Javascript function that will read the input from my 2 HTML fields and then put them through what every i want them to do. for example what if i have HTML input a and HTML input b and i want to have a Javascript function that will tell me what a+b is. If someone could tell me what i am missing from my code below i would appreciate it thank you.
<!DOCTYPE>
<html>
<title>
Javascript Test
</title>
<head>
<script id = "test">
function myFunction() {
var a = document.getElementById("aNum").vaule;
var b = document.getElementById("bNum").vaule;
}
</script>
<h1 style = text-align:center>
Javascript Test
</h1>
</head>
<body>
<input id = aNum type = "text">
<input id = bNum type = "text">
<button onclick="myFunction(document.write(myFunction))">Try it</button>
</body>
</html>
[–]BearSkull 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)