Find element at HTML string

后端 未结 2 1923
北荒
北荒 2020-12-16 11:56

Let\'s suppose I have

var testHTML = \"
\";

I want to get above div as JQuery object

2条回答
  •  遥遥无期
    2020-12-16 12:21

    You could use the .search() function of the javascript itself.

    testHTML.search('demo_div')>-1
    

提交回复
热议问题