I have the following function:
<script>
function assign()
{
String val="";
String val = document.form1.text1.value;
System.out.println(val);
}
</script>
i am trying to call the function in the button click as shown below:
<button type="button" onclick="assign()">Display</button>
When i click on the button nothing happens. I want the string value in the text box to be printed on the console.Please help