There is a HTML code.
<ul class="br"> <li class="bj"> <table> <tbody> <tr> <td class="u"> <a href="/1">1</a> </td> </tr> </tbody> </table> </li> <li class="bj"> <table> <tbody> <tr> <td class="u"> <a href="/1">1</a> </td> </tr> </tbody> </table> </li> </ul> How to get a URL for example 1 links to a variable? I tried to do so
elementList = window.content.document.querySelectorAll('.br .u a')[0].innerHTML; alert(elementList); Does not work.
And it would not be bad to count them all and put them in a variable. But this is the second time, the main thing is to get a certain link.
I tried to count it this way, but not what does not work.
elementList = window.content.document.querySelectorAll('.br .u a'); alert(elementList.length);
ul>tdare built into the correct DOM? Eitherul>li, or draw a normal table - vp_arthdocument.querySelectorAll('.br .u a')[0].getAttribute('href')doesn't work? - vp_arth