Executing [removed] injected by innerHTML after AJAX call

前端 未结 11 1583
误落风尘
误落风尘 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:32

    I used this code, it is working fine

    var arr = MyDiv.getElementsByTagName('script')
    for (var n = 0; n < arr.length; n++)
        eval(arr[n].innerHTML)//run script inside div
    

提交回复
热议问题