Submit a form using anchor element, without javascript

后端 未结 4 1732
傲寒
傲寒 2021-02-19 17:01

How to replace the submit button with a link without using javascript ? is there any way to add the submit attribute to a link ? because the form will not be sent by a simple li

4条回答
  •  一生所求
    2021-02-19 17:56

    There is an another way out. Using this method you can use any element to submit a form. Following is an example:

    
         anything
    
    

    Add a hidden submit button:

     
    

    This will behave exactly as actual submit button.

提交回复
热议问题