jquery uses the attr () method to get and set element attributes, attr is the abbreviation for attribute (attributes), often used in jquery DOM operations attr (), attr () has 4 expressions.
1. attr (property name)//Get the value of the property
The jquery API provides a way to apply disabled and ReadOnly attributes to elements, recorded here. As follows:
1.readonly
Copy Code code as follows:
$ (' input '). attr ("ReadOnly", "ReadOnly")//sets the INPUT element to
Made a complex query page, the field is too many, filled out once, want to empty very troublesome
$ (' #myform ') [0].reset ();
Although the Reset method can do a part, but if you have an element that is like this
"
Then click Reset
Recently has been studying the page effect of jquery, just finished one, take out to share with you. The paging effect is similar to the time network.
First, place a
Then build a page.js file, the specific code as follows (JS used in the CSS
The following method is required when an asynchronous refresh requires updating a select control for a bootstrap framework, adding a to it, or when a value is re-selected, and the value of the hidden select box is modified, but the previous display
There's no need for me to say jqgrid how good, through the following diagram to show you:
Let's talk about how to use it easily:
1. First you need to download Jqgrid's related package: http://www.trirand.com/blog/?page_id=6 (download as needed)
2.
Summarize the checkboxes in the actual development of the common attributes and events in conjunction with jquery:
1,checkbox how the selected state changes:
$ (function () {$ ("#basketBall"). Change (function () {Alert ("BASEketball changing");});})
JQuery Dom operations and JQueryDom operations
Xiaobian recently participated in the development of a website project, so it encountered a lot of js operations. Make small editors scratching their heads. I seem to have been familiar with JQuery for
Attribute operations mainly introduce the implementation of the three interfaces prop, attr, and val. Compared with other interfaces, these three source code implementations are complex and more confusing, if you accidentally use the wrong interface
The collection of 10 small jQuery code snippets can help you develop quickly. 1. You can use the "Animation" and "scrollTop" buttons to return the animation at the top of the screen without using other plug-ins. The collection of 10 jQuery Tips/code
This article shares a piece of jQuery-based code for Selecting All check boxes, deselected all, And deselected functions. If you have any need, you can refer to jquery's functions such as selecting all, deselected, and deselected all, the following
35 jQuery tips on Web Front-end and webjquery tips
1. Right-click prohibited$ (Document). ready (function (){$ (Document). bind ("contextmenu", function (e ){Return false;});}); 2. Hide text in the search text boxHide when clicked in the search
To dynamically change The onclick function in the previous page. I have tried many methods and have not made them. The following are examples of failures. If you need them, refer to how jquery sets the onclick event of the button input? For example,
It is incredible that listbox can implement the addition, deletion, and search of options. As for how to implement it, the specific code may help you by reading this article.
Add, delete, and search two listbox Implementation Options
Paste the main
JQuery tutorial (3) and jquery tutorial1. What is a DOM operation?
Document Object Model (DOM) is a standard programming interface recommended by W3C for processing Extensible Markup Language. On a webpage, objects on an organizational page (or
The jQuery plug-in source code that simulates the effect of electronic signatures and seals. If you need jQuery plug-ins, you can refer to the customer's requirement. You need to stamp the approved documents with the official seal. If you find any
Some hidden attributes will be placed on some form submission pages. The following describes how to control valueless attributes such as hidden and disable in jQuery, if you are interested, do not miss it. Generally, some hidden attributes will be
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.