javascript - Toggle text -
I have a text box with text beside it. When the checkbox is selected and unselected, I want to toggle the text 'yes' or 'no'. I have a hard time with this, is anyone an example of this? I can not answer the status of the checkbox to the Jacobine.
Thanks
javascript ...
Window.onload = function () {var chk = document.getElementById ('CheckboxIdHere') chk.onclick = function () {var lbl = document.getElementById ('LabelEdderHeer') lbl.innerHTML = (this check)? "Not yes"; }} Click the <$ code> $ (function () {$ ("# checkbox here") (function () {$ (< "#LabelIdHere") .HTML (($ (this) .is (": checked")) "yes": "no");});});
Comments
Post a Comment