HTML form with two submit buttons and two “target” attributes

前端 未结 15 2270
暗喜
暗喜 2020-11-29 20:02

I have one HTML

.

The form has only one action=\"\" attribute.

However I wish to have two different target=\"\" attribu

15条回答
  •  迷失自我
    2020-11-29 20:14

    HTML:

    
    
    
    
    
    

    JS:

    $('form').submit(function(ev){ 
    ev.preventDefault();
    console.log('clicked',ev.originalEvent,ev.originalEvent.explicitOriginalTarget) 
    })
    

    http://jsfiddle.net/arzo/unhc3/

提交回复
热议问题