javascript - Using && in jquery if condition under function -
I am checking the value on the radio and choose drop down using jquery in an if condition using Jquery How can both elemental values be examined? I tried this kind of thing, but it is not working for me:
$ ("# filterresult"). Click (function ($ ('$ filter_deductible'). Val () == "Id_0" & $ ('# trip_type_filter_no'). Val () == "No") {// Some code Here} I know I can not use; & jp; jquery code I have to use many selectors, but I do not have a way to use it. ?
This is my html:
& lt option = "id_0" & gt; only & lt; / option & gt; & lt; option value = id = "Filter_deductible" name = "filter_useductible" gt; & lt; option value = "" & gt; "Id_0_250" & gt; 0-250 & lt; / option & gt; option option N = "id_250_1000"> 250-1000 option value = "id_1001"> 1000 and higher Gt; All deductible & lt; / option & gt; & lt; / select & gt; and
& lt; input type = "radio Call ID = "Trip_type_filter_no" name = "trip_type_filter_no" value = "no" /> No Calling function U sing a button:
& Lt; Input type = "button" name = "filtererset" id = "filterresult" class = "newquote" value = "filter result" />
The first radio button to link should have the same name, you have a different name Are the names. This means that you can choose both of them.
Second, Val () will always return the value. You want to see if it has been selected.
if ($ ('# filter_deductible'). Val () == "id_0" and $ ('# trip_type_filter_no'). (":" Checked)
Comments
Post a Comment