javascript - var checkedValue - Jquery - how to change language? -


i using extract checkbox value:

var checkedvalue = $('.messagecheckbox:checked').val(); 

however, when checkbox on, displays "on", when off, displays nothing.

like this:

is checked (yes): on checked (no): 

what should change make appear on/off, , how can change language or @ least edit result's text?

try this.

 var text = checkedvalue ? 'yes' : 'no';  console.log(text); 

https://jsfiddle.net/twugud15/


Comments

Popular posts from this blog

Payment information shows nothing in one page checkout page magento -

tcpdump - How to check if server received packet (acknowledged) -