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

Popular posts from this blog

c++ - Linux and clipboard -

Visual Studio 2005: How to speed up builds when a VSMDI is open? -

booting ubuntu from usb using virtualbox -