Here is a simple code snippet that I have written.
<script language='javascript">
function check() {}
</script>
<div id="a">input type="text" name="b">
<input type="button" onClick=" check(); ">
My goal is to update the value of the text field when the button is pressed.
I attempted using b.value=" C "
, but it did not produce the desired result.