1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
| <form hidden="" id="form" method="post"> <input type="text" value="" name="rel" id="rel"> <input type="text" value="" name="answer" id="answer"> <input type="text" value="" name="curPage" id="curPage"> <input type="text" value="" name="examName" id="examName"> </form> <button typr='button' id='but1' class='but1'></button> <button typr='button' id='but2' class='but2'></button> <script> $(document).on('click','button.but1',function(){ $("#form").attr("action","url"); $("#form").submit(); }) $(document).on('click','button.but1',function(){ $("#form").attr("action","url"); $("#form").submit(); })
</script>
|