ie javascript form submit with file input

后端 未结 8 554
-上瘾入骨i
-上瘾入骨i 2020-12-02 17:35

I have a html form, with a custom file upload field. And by that I mean that I have moved the actual file field beyond the borders of the page with css, that I have a custom

8条回答
  •  长情又很酷
    2020-12-02 17:57

    You need to change onsumbit='return false;' to onsubmit='return validateForm()'.

    Then have validateForm() return true if the form passes your validation checks, or false if it does not.

    The onsubmit='return false' is preventing the form from submitting via document.thisForm.submit(); as well as when the user clicks the submit button.

提交回复
热议问题