Jquery一般tagName

pch*_*arb 0 javascript jquery

这是否可以访问具有通用标记名称的选择器.就像在sql中一样,如果要查找包含"ert"的varchar,则将其写为"%ert%"

我可以去("#%_tagname%").hide();吗?

Nea*_*eal 5

您可以使用开头,结尾和包含:

$('[id^="start_"]').... // the id starts with `start_`

$('[id$="_end"]').... // the id ends with `_end`

$('[id~="something"]').... // the id contains `something` within
Run Code Online (Sandbox Code Playgroud)