U
U
Uniq2018-02-06 07:18:28
JavaScript
Uniq, 2018-02-06 07:18:28

How to implement filter without jquery?

the date variable stores String (text) = html page, if it's simpler, you need to find the id="root" element in it and take it in place with the child elements.
the script itself Thanks in advance
$(data).filter('#root').html();

Answer the question

In order to leave comments, you need to log in

1 answer(s)
U
Uniq, 2018-02-06
@padonnak

I found the solution myself, thanks everyone

var tmp = document.implementation.createHTMLDocument();
          tmp.body.innerHTML = str;
          return tmp.body.querySelector('#root');;

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question