For example, I have 2 elements like this:
<div id="id_1">ELement 1</div>
<div id="id_2">ELement 2</div>
<div id="not_id">different id</div>
how can I remove just all elements beginning with “id_”,.?
thanks,.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can use an attribute starts with selector:
Edit (see comments)
Your question says “all elements”, which is why the selector in my example is not as specific as it potentially could be. If you care about performance (in the real world, making this selector more specific is not going to make a noticable difference), then you should make your selector as specific as possible. If it is only
divelements you care about, apply the “starts-with” selector todivelements only: