JQuery - go down with selector name -
i created code:
$("input[name*='gridview1$ctl02']").each(function () { if(this.type == 'checkbox'){ if(this.checked == true){ alert("test") } else { alert("test2") } } })
its when write $("input[name*='gridview1$ctl02']")
need array of ct101,ct102,ct103
i need this:
$("input[name*='gridview1']").find("ct").each ...
you can simple create selector match element name starts gridview1:
$("input[name^='gridview1']").each(function () {if(this.type == 'checkbox'){if(this.checked == true){alert("test")}else{alert("test2")}}})
alternative if want text inputs:
$("input[name^='gridview1'][type='text']").each(function () {if(this.type == 'checkbox'){if(this.checked == true){alert("test")}else{alert("test2")}}})
Comments
Post a Comment