/* Get the text value */var textval = $ ("# text_id "). attr ("value"); // or var textval = $ ("# text_id "). val ();/* Get the value of the single-choice button */var valraio = $ ("input [type = raio]: checked "). val ();/* Get the value of a set of radio selected items named items */var item =$ ('input [name = items]: checked '). val ();/* Get the value of the check box */var checkboxval = $ ("# checkbox_id "). attr ("value");/* Get the value of the drop-down list */var selectval = $ ("# select_id "). val ();/* text box, text area */$ ("# text_id "). attr ("value", ''); // clear content $ (" # text_id "). attr ("value", 'test'); // fill in the Content/* multiple choice box checkbox */$ ("# chk_id "). attr ("checked", ''); // make it unchecked $ (" # chk_id "). attr ("checked", true); // select if ($ ("# chk_id "). attr ('checked') = true) // determines whether a single-choice group is selected/* radio */$ ("input [type = radio]"). attr ("checked", '2') // set the project with value = 2 to the currently selected item/* select */$ ("select_id") in the drop-down box "). attr ("value", 'test'); // set the value = test project to the currently selected item $("test2 "). appendTo ("# select_id") // Add option $ ("# select_id") in the drop-down box "). empty (); // clear the drop-down box/* Get the value of a set of radio selected items named items */var item =$ ('input [name = items]: checked '). val (); // if not selected, val () = undefined/* obtain the text of the selected select item */var item = $ ("select [name = items] option: selected "). text ();/* the second element of the select drop-down box is the currently selected value */$ ('# select_id') [0]. selectedIndex = 1;/* the second element of the radio Group is the currently selected value */$ ('input [name = items] '). get (1 ). checked = true;/* reset the form */$ ("form "). each (function (){. reset ();});