JavaScript implementation checkbox or reverse

The following is a selection / reverse entry implementation of the check box implemented by the native JS, and select the effect of checkbox, and the style changes.
The code is the simplest, the JS behavior optimization version, and the copy paste can be used.

   check box is selected / reverse selection effect   body, DL, DT, DD, P {Margin: 0; Padding: 0;} body {font-family: Tahoma; font-size: 12px;} label, input, a {vertical-align: middle;} label {padding: 0 10px 0 5px;} a {color: # 09f; text-decoration: none;} a: hover {color: red;} dl {width: 120px; margin: 10px auto; border-radius: 5px; background: #fafafa; } DT {padding-bottom: 10px; border-bottom: 1px solid # 666;} DT label {font-weight: 700;} p {margin-top: 10px;}        
Option (1)

Option (5)

Option (6)

Option (7)

Option (9)

option (ten

(function () {var ainput = document.getlementsBytagname ("input"); var aback = document.getlementsBytagname ("a") [0]; var Alabel = Document.GtelementSbyTagname ("label") [0]; var allinput = ainput [0]; // alllective settings, if the event occurs, if you are selected, the text content changes allinput.onclick = function () {IF (ainput [0] .checked) {for (var i = 1; i

The above is all of this news, I hope to help everyone, and I hope everyone will support Tumi Cloud.

© Copyright Notice
Just support it if you like
comment Grab the couch

Please log in to comment