How I can get value from cName inputs:
<form method="post" action="">
<input type="hidden" name="cName" value="test1" />
<input type="submit" name="get" />
</form>
<form method="post" action="">
<input type="hidden" name="cName" value="test2" />
<input type="submit" name="get" />
</form>
I want when I click get with jquery or javascript to get value from cName.
When you say “click,” do you mean click the submit button, thus submitting the form? If so, you should use the
submitevent instead, as it will also be triggered when the user presses the Enter key: