I have multiple forms, and I want to send classnames of these HTML form’s fields in an array to a PHP server.
For example:
<form action="x.php">
<input type="text" name="name_ajax" class="classname1" /></p>
<input type="text" name="email_ajax" class="classname2" /></p>
<input type="submit" value="Submit" />
</form>
I want to send classname1 and classname2 in an array via jQuery and Ajax to server.php after loading the page.
1 Answer