how to execute ajax output script

后端 未结 5 395
故里飘歌
故里飘歌 2021-01-20 11:02

I\'m getting an ajax output success data.

Where the data contains some html text and a script.

But the script is not executing, how can I execute the script.

5条回答
  •  旧时难觅i
    2021-01-20 11:49

    Not sure if you are using a library, but with Prototype I had to set

    evalScripts: true
    

    before JavaScript would be eval-ed. See here for more info:

    http://www.sergiopereira.com/articles/prototype.js.html#UsingAjaxRequest

提交回复
热议问题