Submit an HTML form without having a submit button?

前端 未结 11 1442
攒了一身酷
攒了一身酷 2021-01-01 18:57

Can I submit a html

with
instead of ?

Like this:

         


        
11条回答
  •  春和景丽
    2021-01-01 19:43

    Only by using JavaScript, typically you'd use jQuery and tie the click event of the div to the submit event of the form.

    See: http://api.jquery.com/submit/

    The example there even demonstrates this exact scenario.

提交回复
热议问题