jquery ajax cutting off response in IE

前端 未结 1 686
孤独总比滥情好
孤独总比滥情好 2021-01-06 22:03

I am using the jquery form plugin which uses jquery ajax to do most of its work. We have jquery 1.7.2

We are using it to send a form via ajax to the server and eithe

相关标签:
1条回答
  • 2021-01-06 22:26

    It's not a jQuery bug.

    It's a not-so-well-known Javascript "feature"

    Apparently innerHTML in FF3 and IE6+ (And maybe others) don't like form tags as part of innerHTML. If you want, you can test it:

    <div id="test">
       <form>
          <input>
       </form>
    </div>
    
    <script>
        window.onload=document.getElementById('test').innerHTML = "<form><input type="hidden" name="blah"></form>";
    </script>
    
    
    
    Result:
    
    <div id="test">
        <input type="hidden" name="blah">
    </div>
    

    Not quite sure why, but that is how they implement it.

    0 讨论(0)
提交回复
热议问题