css - select element which have specific attribute -



css - select element which have specific attribute -

i've input buttons without class or id , have onclick attr on this:

<input type="button" onclick="myfunc();" />

and there other input type buttons , want style buttons have onclick attribute.

so, here can this:

input[onclick="myfunc();"]{color: red;}

but in onclick there may function myfunc(), thisfunc(), or anyfunc().

so how can select input buttons have onclick attribute.

the value can omitted:

input[onclick]{color: red;}

on unrelated note, seems interesting utilize case. utilize this, perhaps styling border or instead of text, in order highlight form elements (or other elements) event handler attributes, "debugging" purposes.

css css-selectors

Comments

Popular posts from this blog

php - Android app custom user registration and login with cookie using facebook sdk -

django - Access session in user model .save() -

php - .htaccess Multiple Rewrite Rules / Prioritizing -