JQuery .get doesnt execute Javascript

前端 未结 2 797
终归单人心
终归单人心 2021-01-22 13:45

I am using JQuery .get method to retrieve some content from a webpage (page 1) and show it in a div in the main page. The problem is the content retrieved contains some javascri

2条回答
  •  傲寒
    傲寒 (楼主)
    2021-01-22 14:24

    You can use .load() function instead of .get(). It automatically executes the scripts that are contained in the response.

    Here is the documentation: .load()

提交回复
热议问题