I want to select the following three values from the HTML file either from Jquery or Javascript. Class "class 1" href value
How can I select all the data of the node with the node? I'm lost: (
& lt; ol id = "result-set"> gt; & lt; li id = "v-0" & gt; & lt; div Class = "result-data" & gt; .. & lt; h2 & gt; one class = "class1" href = "" & gt; Personality & lt; / a & gt; & lt; / h2 & gt; & Lt; dl class = "original"> gt; title title & lt; dd class = "title" & gt; accountant & lt; / dd & gt; ... & lt; / dl & gt; & lt; / div & gt; & lt; / li & gt; & lt; li id = "v-1" & gt; ... & lt; / Li & gt; .....
To get "personality": $ ('#V-0 h2 a') .HTML (); To get href of that link: $ ('# v-0 h2 A '). Attr ('Href'); To get the "accountant": $ ('# v-0 dl dd'). Html (); You can modify the ID ("v-0") at the beginning of the selector to select a particular "row" of your data set.
Comments
Post a Comment