开发者

jquery validate radio button

$('#webForm').validate({

                            rules : {

                                chos: {
                                    required : true,

                                },

                            },
                            messages : {

                                chos: "Please select radio button" ,

                            },

                        });
                    });

<input type="radio" name="chos" value="开发者_如何学JAVAphone"/>
<input type="radio" name="chos" value="email"/>

The above code is not working. I need radio buttton validation for the above code.


The provided code is not valid object notation (although it may be accepted by some browsers). Try:

$('#webForm').validate({
    rules : {
        chos: {
            required : true
        }
    },
    messages : {
        chos: "Please select radio button"
    }
});
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜