0

我有这个表格html:

<form id="testForm" method="post" action="upload.php" target="upload_target" enctype="multipart/form-data" style="margin-bottom:0;">
    <textarea name="infoText"></textarea>
    <input id="file-input" name="bid-file" type="file" style="visibility:hidden;">
    <input type="submit" id="submitBtnFile" style="visibility:hidden;">
</form>
<button id="#submitBtn">Submit</button>

<iframe id="upload_target" name="upload_target" src="#" style="width:0;height:0;border:0px solid #fff;"></iframe>

我的js是:

$('#submitBid').click( function(){
    $('#objectCommentsSubmit').trigger('click');
    $('#submitBtnFile').trigger('click');
    $('.loading-bid').show();
});

这适用于 Safari、Firefox 和 Chrome,但不适用于 IE!

谁能告诉我我在 IE 上做错了什么?

谢谢!

4

1 回答 1

1

尝试改变

$('#submitBtnFile').trigger('click');

$("#testForm").submit();
于 2013-01-08T14:58:41.367 回答