Rewrite the title to: From less information to more information: Auto-click to expand collapse links
P粉037450467
P粉037450467 2023-09-13 09:47:35
0
1
411

I'm trying to use automation to display more information on click of a "more details" link on a popup, but the link doesn't have any id associated with it. When I inspect the link in the Chrome console, it appears to be the "href="#myCollapse"" line in the associated element below. I don't really understand js but tried something like document.getElementById('#myCollapse'). click();...and try to use the child with id="popup-content".

P粉037450467
P粉037450467

reply all (1)
P粉818306280

Just use the following selector:

document.querySelector('#popup-content a[href="#myCollapse"]').click()
    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!