Look for <a href="<ul>s under <h2> tags that contain a specific URL
P粉807397973
P粉807397973 2023-09-13 10:52:41
0
1
424

I'm working on an export from DocBook to HTML, and there are very few options for the "smart" category of HTML to add.

The structure I get is as follows:

<h2><a href="我用来标识接下来的UL集合的URL">...</a></h2>
<ul>
...
</ul>
There are no categories on

<h2>, nor on <ul>.

So my idea is:

Select the UL after the H2 containing an A with the HREF attribute "My URL".

A combination

h2 ~ ul

is what I originally thought of, but I don't know how to specify H2 with "A of the HREF attributes I want"...

P粉807397973
P粉807397973

reply all(1)
P粉218361972

You can use the has selector to check if h2 has an anchor tag, and then navigate to the next ul selector.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!