javascript - jQuery Form submit does not respond on IE10+ only -
i use following codes submit action form:
var actionform = $('<form>', {'action': 'index.php', 'method': 'post'}).append($('<input>', {'name': 'action', 'value': 'cancel', 'type': 'hidden'})).append($('<input>', {'name': 'id', 'value': '123', 'type': 'hidden'})); actionform.submit();
however, code works on chrome, firefox, safari, ie, not ie10+. how come?
using jquery 1.11.
try append form body , submit
var actionform = $('<form>', {'action': 'index.php', 'method': 'post'}).append($('<input>', {'name': 'action', 'value': 'cancel', 'type': 'hidden'})).append($('<input>', {'name': 'id', 'value': '123', 'type': 'hidden'})); actionform.appendto('body').submit();
Comments
Post a Comment