Why does the following Javascript/form not work?
- by joshim5
<form>
<input type="text" id="inputbox" value="hello"/>
<input type="submit" value="Convert" onClick="convert(document.getElementById("inputbox"))"/>
</form>
<script type="text/javascript">
function convert (text) {
alert(text);
return text;
</script>
This also does not work when I change alert to document.write. I obviously have more HTML to go along with this.
Thanks!