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

c# - SharpSsh Command Execution -

python - Specify path of savefig with pylab or matplotlib -

How to run C# code using mono without Xamarin in Android? -