Home >Web Front-end >JS Tutorial >Control the CSS of input but do not affect the style of CheckBox and Radio_Form special effects

Control the CSS of input but do not affect the style of CheckBox and Radio_Form special effects

WBOY
WBOYOriginal
2016-05-16 18:46:031060browse

However, the checkbox, radio, etc. will also change accordingly, and often the display of these two controls is very unsatisfactory. I thought:
If there was a way to change the style of other input controls without affecting the checkbox and radio. I searched
on the Internet for a long time but could not find the appropriate code: it is nothing more than adding a style, and then adding a class="xxx" to each checkbox control
But this is too troublesome. After testing and research, I found: expression((this.type!="checkbox")?(This can be achieved. You can take the following
code to IE to test it. This method is feasible in IE8, but I have not tested whether it is feasible in FireFox.


[Ctrl A Select all Note: If you need to introduce external Js, you need to refresh it to execute ]

In addition, on the Internet, everyone thinks The input[type="checkbox"] style is a style supported by firefox
which can individually control the style of each control in the input.
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn