Parsing returned HTML from jQuery AJAX request

后端 未结 7 1354
你的背包
你的背包 2020-12-01 14:01

What I\'m trying to do seems simple: get an HTML page through $.ajax() and pull out a value from it.

$(function () {
    $.ajax({
             


        
7条回答
  •  没有蜡笔的小新
    2020-12-01 14:50

    All answers do not point to the real problem, jQuery seems to ignore the head and body tag and creates an array of nodes. What you normally want is, extract the body and parse it.

    Take a look at this helpful answer, I do not want to copy his work: https://stackoverflow.com/a/12848798/2590616.

提交回复
热议问题