Para comprobar si un checkbox esta seleccionado basta crear un selector de jQuery y verificar si su valor esta en “on”
$("#idcheckbox").bind("change",function(){ if($(this).val()=="on"){ alert("Seleccionado"); } });
Para comprobar si un checkbox esta seleccionado basta crear un selector de jQuery y verificar si su valor esta en “on”
$("#idcheckbox").bind("change",function(){ if($(this).val()=="on"){ alert("Seleccionado"); } });
código, Javascript, jQuery, web
This entry was posted on Monday, January 19th, 2009, 4:14 pm and is filed under Javascript. You can follow any responses to this entry through RSS 2.0. You can leave a response, or trackback from your own site.
| M | T | W | T | F | S | S |
|---|---|---|---|---|---|---|
| « Jul | ||||||
| 1 | 2 | 3 | 4 | 5 | ||
| 6 | 7 | 8 | 9 | 10 | 11 | 12 |
| 13 | 14 | 15 | 16 | 17 | 18 | 19 |
| 20 | 21 | 22 | 23 | 24 | 25 | 26 |
| 27 | 28 | 29 | 30 | |||
Fusion theme by digitalnature | powered by WordPress
Entries (RSS) and Comments (RSS) ^
#1 by Ehecatl - January 25th, 2009 at 23:20
buenisima manera de metr presion! Ya me apuro
#2 by Oscar Arzola - January 26th, 2009 at 01:08
No, para nada
realmente me agrado mucho ese dibujo y era de alguna manera lo que quería no más, sinceramente agradezco mucho tu apoyo..
#3 by Albert - October 17th, 2009 at 19:20
Es mejor usar esta:
$(obj).is(’:checked’)
Porque uno puedo colocar un valor value=”" al checkbox!!!!
#4 by s@dico - October 19th, 2009 at 19:15
Consido hay forma de hacerlo mucho mas sencillo asi
var checkeado=$(”#name_checked”).attr(”checked”);
if(checkeado) {
var checkbox=1;
} else {
var checkbox=0;
}
#5 by Alfonso Bribiesca - November 11th, 2009 at 18:37
Wooorale oscar, busque checkbox + jquery y encontre tu página vientos!
#6 by oscar arzola - November 18th, 2009 at 21:20
Jaaaa que nice… que bueno que el page rank vaya bien.. :d Saludos estimado
#7 by dasdd - March 20th, 2010 at 00:21
asdasdasdasd
#8 by dasdd - March 20th, 2010 at 00:21
putos
#9 by kumda - July 23rd, 2010 at 21:06
Gracias Albert, preciso, sencillo, rápido.
#10 by neilmas - July 31st, 2010 at 04:25
La que captura el valor no funca el que pone Albert y Alfonso.
#11 by neilmas - July 31st, 2010 at 04:27
el que pone albert y alfonso si funciona.