JSFiddle - React, Tailwind, and code Playground
HTML
<form id="foo" method="post" action="http://www.google.com">
<input type="text" value="test">
<input type="hidden" value="test2">
<input type="submit" value="test3">
</form>
JavaScript
$(document).ready(function() {
//$("input[type!='submit']")
//$("input[type!='hidden']")
$("input[type!='submit'][type!='hidden']")
.val("changed");
$("#foo").submit(function(){
$("input").each(function(){
alert($(this).val());
});
return false;
});
});