Why is it that, the only way this will work is if I pass the entire:
add(document.getElementById('num1').value)
to the function, as opposed to simply adding: add(num1)
<script>
function add(num1){
total=num1*1+3;
alert(total);
}
</script>
</head>
<body>
<input type="text" id="num1" size="4">
<input type="button" onClick="add(document.getElementById('num1').value)";
</body>
</html>