Tìm kiếm hỗ trợ

Tránh các lừa đảo về hỗ trợ. Chúng tôi sẽ không bao giờ yêu cầu bạn gọi hoặc nhắn tin đến số điện thoại hoặc chia sẻ thông tin cá nhân. Vui lòng báo cáo hoạt động đáng ngờ bằng cách sử dụng tùy chọn "Báo cáo lạm dụng".

Learn More

What syntax does the search feature in Developer tools use?

  • 1 trả lời
  • 1 gặp vấn đề này
  • 20 lượt xem
  • Trả lời mới nhất được viết bởi user1929

more options

The search boxes in the inspector window window returns no results whenever I try to search for specific key-value pairs like: role="main".

I can only get results for main or role. Is there a search string parameter/syntax reference anywhere? I've searched high and low, but articles/references found in the documentation is VERY basic.

Thanks

The search boxes in the inspector window window returns no results whenever I try to search for specific key-value pairs like: role="main". I can only get results for main or role. Is there a search string parameter/syntax reference anywhere? I've searched high and low, but articles/references found in the documentation is VERY basic. Thanks

Giải pháp được chọn

Hi,

I'm not aware of any documentation for it, although there might be something. As far as I can tell, you can typically just search for a string of text, but this won't work in some cases, like what you've found. You can also type CSS selectors to find elements, which works a lot better - for your example, you could use this CSS selector:

[role="main"]

Hope that helps!

Đọc câu trả lời này trong ngữ cảnh 👍 1

Tất cả các câu trả lời (1)

more options

Giải pháp được chọn

Hi,

I'm not aware of any documentation for it, although there might be something. As far as I can tell, you can typically just search for a string of text, but this won't work in some cases, like what you've found. You can also type CSS selectors to find elements, which works a lot better - for your example, you could use this CSS selector:

[role="main"]

Hope that helps!