jquery动态form在firefox不能提交
$("#tijiao").click(function(){ var form = $("<form></form>"); form.attr('action',"vendor_payment_list.action"); form.attr('method','post'); form.attr('target','_self'); var input = $("<input type='hidden' name='test'/>") input.attr('value', 123); form.append(input); form.submit(); });
上述代码在chrome,ie上可以提交,在ff上不能提交
需要将
form.submit(); 改为: $(form).appendTo("body").submit(); 才能正常执行
相关推荐
Qc 2020-07-19
swiftwwj 2020-07-05
wcqwcq 2020-07-04
TONIYH 2020-06-11
yhginny 2020-04-20
nicepainkiller 2020-05-12
苦咖啡flask 2020-05-09
xinjing0 2020-05-08
Lius 2020-05-05
ajaxtony 2020-05-04
bcbeer 2020-04-23
sicceer 2020-04-20
cmsmdn 2020-02-18
longshengguoji 2020-02-13
ajaxtony 2020-02-03
ELEMENTS爱乐小超 2020-01-17
waterv 2020-01-01