How to execute javascript inside a script tag returned by an ajax response

后端 未结 7 1851
我在风中等你
我在风中等你 2020-11-30 05:10

I\'m sending a jquery get request like so:

$.get($(this).attr(\"href\"), $(this).serialize(), null, \"script\");

The response I expect to r

7条回答
  •  暖寄归人
    2020-11-30 05:49

    If I understand your question right, this should suffice to get the text out of the script tags:

    $(response).text()

提交回复
热议问题