I just want to understand this part. I renders well on w3schools but when I try to run it, value only shows undefined
. thank you for your help.
<!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<body>
<input type="number" name="non" oninput="myFunction()">
<textarea id="demo"></textarea>
</body>
<script type="text/javascript">
function myFunction() {
var x = document.getElementsByTagName('non').value;
document.getElementById('demo').innerHTML = "your value:" + x;
}
</script>
</html>