Executing [removed] injected by innerHTML after AJAX call

前端 未结 11 1585
误落风尘
误落风尘 2020-11-22 05:02

There\'s a div called \"Content\":

It should be filled with data from a PHP file, by AJAX, including

11条回答
  •  孤独总比滥情好
    2020-11-22 05:14

    This 'just works' for me using jQuery, provided you don't try to append a subset the XHR-returned HTML to the document. (See this bug report showing the problem with jQuery.)

    Here is an example showing it working:

     
     
     
         
        test_1.4 
         
         
     
     
        
    I'm going away.

    Here is the equivalent of the above: http://jsfiddle.net/2CTLH/

提交回复
热议问题