Get textfield value
<html> <head> <script type="text/javascript"> <!-- function convertText() { document.SampleForm.myText.value = document.SampleForm.myText.value.toUpperCase() } --> </script> </head> <body> <form name="SampleForm"> <input type="text" name="myText"> <input type="button" value="Convert" onclick="convertText()"> </form> </body> </html>