I'm just trying to output a value, but whenever it gets to "var max = tb1.value;" it stops working. I can't find out what's wrong with my code.
<html>
<head>
<script language="javascript" type="text/javascript">
var tb1 = document.getElementById('textbox1');
function output() {
var max = tb1.value;
document.write( max );
}
</script>
<title>asd</title>
</head>
<body>
<form>
<input name="max" type="text" id="textbox1"><br>
<input name="submit" type="button" value="Enter" onClick="output()">
</form>
</body>
</html>