Parsing returned HTML from jQuery AJAX request

后端 未结 7 1327
你的背包
你的背包 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

    If you would like to parse it, jquery has a nifty trick :)

     ParsedElements = $(htmlToParse);
     Console.log(ParsedElements);
    

    You now have DOM elements you can traverse without placing them in the body of the document.

提交回复
热议问题