The principle is very simple. Through the local storage mechanism (userData or localStorage), the state of elements in the form is stored locally. You can restore the stored state to the form element when necessary.
The json data format is also used.
On the one hand, out of interest in mootools (although not as hot as jQuery), on the other hand, it also wants to add a little power to the promotion of mootools, although this is insignificant.
With the two previously released mootools components,
Function Code:Copy codeThe Code is as follows:Document. getElementByIdx_x = function (id ){If (typeof id = 'string ')Return document. getElementById (id );ElseThrow new error ('Please pass a string as a id! ')} Instance code:Copy codeThe Code is as
The Number method is relatively small. There are eight methods in total:ToColorPart: converts a Number object to a hexadecimal format with two digitsSucc: returns the next value of the current Number object, that is, the current value plus one.Times:
For example:Search box: Text area: You can enter your suggestions or comments to create more convenient services for your website... ........First of all, this kind of prompt function is very good and intuitive, but how to clear the content when
This time component was sent once before, and the last time it was very bad. This time it was time to upgrade it. The performance is better and it is perfectly compatible with all browsers. The ie6 drop-down select file is not available.In short, it
Specific Technology 1. Use GB encoding and UNICODE Conversion2. array Association sortingNote: GB encoding library address http://demo.jb51.net/jslib/qswhGB2312.jsCode (the demo is very simple)Copy codeThe Code is as follows: Note: This sorting
Solution:1. Add a [-] [+] to the title for users to click.2. the user's behavior of shrinking and expanding the screen is saved in the Cookie. You can still remember your behavior when you reload the page or log on to the system again. Advantages:
Jquery's event mechanism is actually perfect, including clicking, double-clicking, moving the mouse in, and moving the mouse out. However, one event is missing. That is, right-click the event. Of course, you can also directly listen to the mouse and
TIPS:The concat and push methods of arrays.The main differences between the two are:Concat is a connected array and does not modify the original array. The returned value is the connected array. An important difference between concat and push is
Introduction:Today, I saw a question from someone else:Copy codeThe Code is as follows:Function fn (x ){X = 10;Arguments [0] = 20;Console. log (x, arguments [0])}Fn () I feel like I have no idea about this. I can try it myself, so I will analyze it
CauseSomeone asked, "If nodejs is used to access SQL server ?"After finding the information, I found two solutions: Use the third-party nodejs plug-in: https://github.com/orenmazor/node-tds、to use the
Product Information is simulated using JSON dataIf you click the same product multiple times, you will not add it again. Instead, the number of existing products is + 1,You can also manually enter the number of items. If you enter 0, the item will
There are also a lot of encapsulated JS animation libraries on the Internet, but most of them are too functional, and as for the large amount of code, thousands of lines are too frequent to be used in small projects. Here we have encapsulated a
For example.
You can use text-align: center; to center. Proportional scaling cannot be solved by using the width and height attributes of the preset . Because the user picture may be very long or wide. I thought about their relationship online and
Of course, you may not be good at it now, but I am sure you will find that they are used in your future projects !.
Nivo Slider
Undoubtedly, this plug-in is the world's most awesome jQuery slider image with over 15 transition effects.
Anything
(1) Page code:Copy codeThe Code is as follows: Insert title here Href = "js/themes/basic/grid.css"/> (2) the data in the backend servlet is simulated.Copy codeThe Code is as follows:/*** Servlet implementation class DataServlet*/Public class
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.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service