i have written this code , i have a text field and when i enter something in text box and click submit.the value of text box should alert message box.
how to do this? pls help me
here is what i have tried
<form name="input" action="#" method="post" <input type="text" name="cost" value=" "> </form>
var trlist = document.getElementsByName("cost"); alert(trlist);
How to get values from textbox and print it in alertbox?