To get the radio button value:
$ ("input[type= ' Radio ']"). Click (function () {
var valcheck=$ (' input:radio[name= ' insku.notonlystr "]:checked '). Val ();
Alert (' Obtained value is: ' + $ ' (' [name= ' notonlystr '][checked=true]:radio '). Val ());
alert (Valcheck);
});
The drop-down box loads asynchronously, returning the JSON
$ ("#goodsType"). Change (function () {
var id= $ (this). Val ();
var str1= "<option value=>--Please select--</option>";
$.ajax ({
Type: "POST",
DataType: "JSON",
URL: "${pagecontext.request.contextpath}/category!loadchildrens.action",
data:{id:id},//no parameters are not required here
Success:function (data) {
Jquery.each (Data,function (key,value) {
var list=value.list;
for (Var i=0;i<list.length;i++) {
STR1 + = "<option value=" +list[i].id+ ">" + list[i].name+ "</option>";
}
document.getElementById ("Goodsfield"). InnerHTML = str1;
});
}
});
});
jquery JSON Learning