jquery Gets the Select element and selects the text and value:
1. $ ("#select_id"). Change (function () {//code ...}); Adds an event for a select that fires when one of the items is selected2. Var checktext=$ ("#select_id"). Find ("option:selected")
Jqgrid Documents: Http://www.trirand.com/jqgridwiki/doku.php?id=wiki:jqgriddocs
Jqgrid demo:http://trirand.com/blog/jqgrid/jqgrid.html
Jqgrid Foundation, I do not introduce here, do not know can go to visit the blog Park or Google, the best to see
CSS operations have an important approach: CSS ()
CSS () has three different syntax to complete their work:
$ (selector). CSS (Name,value)$ (selector). css ({properties})$ (selector). CSS (name)
Return CSS Property use CSS (name) to return the
The DOM is the abbreviation for Document Object model, meaning the documentation objects models. Dom is a browser, platform, language-independent interface that makes it easy to access all the standard components in a page.
Dom operations can be
js Get check box selected value
0
1
2
3
4 5
6 7
JS Code
Several other actions on a checkbox
1. Select All2. Cancel all elections3. Select All Odd4. Anti-election5. Get all the
"Cause of the problem"
This should be a flaw in the jquery.datatable control itself. The ID of the checkbox widget in the control is write-dead, so when multiple DataTable references are made to a page, the Select event matches all of the DataTable,
jquery Gets the Select element and selects the text and value:
Copy Code code as follows:
$ ("#select_id"). Change (function () {//code ...}); Adds an event for a select that fires when one of the items is selected
var checktext=$ ("
Generally we place some hidden attributes when implementing some form submission page
For example, when you modify a record, the ID of the record is embedded in the edit window
In the presentation interface, it is sometimes necessary to set the
attr (name)
Gets the property value of the first matching element. This method makes it easy to get the value of a property from the first matching element. Returns undefined if the element does not have a corresponding property.
Access a property
How should jquery set the OnClick event for button input? For example, there is a button at the beginning: This line of code is generated in the background of the program, and the discuz! NT Forum source code in the same way, all the things on the
Commonly used emptying a form
The code is as follows
Copy Code
$ (': input ', ' #myform '). Not (': button,: Submit,: RESET,: Hidden '). Val ("). removeattr (' checked '). Removeattr (' selected ');
Cases
Summing up the actual development of the checkbox combining jquery Common Properties and events:
1,checkbox how the selected state changes:
$ (function () {$ ("#basketBall"). Change (function () {Alert ("BASEketball changing");});})
2,checkbox
jquery Gets the value of option and operates on option
This article introduces jquery to get the value of option and the operation of option, below is a good example analysis and sample code, interested friends can understand the next
jquery Gets
When AJAX (jQuery) is used for asynchronous data request, to prevent users from repeatedly clicking the button for some reason, we need to disable the request submission button.Key Points: The attr and removeAttr functions of jQuery are mainly the
HTML documents not only have a series of semantic tags, but each tag has a series of attribute nodes. Naturally, we also want to operate on these attribute nodes. The format is still $ (selector). Method
Attribute processing of Elements
JQuery attribute and CSS operations, jquery attribute css operations
Attribute1. Attributes1.1 attr (name | properties | key, value | key, fn)1) Get the property value $ ("img"). attr ("src ");2) set the attribute value $ ("img "). attr ("title",
I encountered a problem today. I need to get the tagName. I used jquery to query it. We use $ (& quot; dd & quot ;). attr (& quot; tagName & quot;) can be obtained, but the returned value is undefined. As a result, after a long query, the returned
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.