javascript - Using Jquery with Radio buttons -
I'm putting a simple order lookup form until I've added a radio button, it worked well-old JS In, I used the simple function to capture the radio button value and drop it into the string. Jquery is a different way I think I'm close to doing this:
Whatever I've done so far:
var e = $ ("input: ordernum: checked") .val (function (index, value) {return value + "+ + this.className; var groupname = e. option [e.c.edited index] .value;}); Xmlhttp.open ("GET", "orderearch.php OrderID =?" + ORDERNUM + "& q =" + str, true); Xmlhttp.send ();
Previously, with the drop down, it was used:
var e = document.getElementById ("groupnum "); - & gt; Var groupname = e.options [e.selectedIndex] .value; });
This is probably a simple fix. Do I need to name the ideabid or getElementby in this example?
var e = $ ("Input: Ordernum: checked") .val (function Index, value) {
I do not know about the selector in a
ordername jQuery.
If you use an ID If you want to select the element, use
$ ('# id') in your case,
$ ('# ordernum: checked')
But I do not think you need it ~ to create a radio button group, give them a common
name .
< Code> $ (' [name = "yourGroupName"]: Checked '). Access the value of the selected radio button in a group like Val ()
Comments
Post a Comment