Sometimes we need to prevent the page with the backspace key from moving back. Generally, it is better not to use this method. For poor UX experience, the following JavaScript fragments have been tested in IE9 and Firebox 10.0.2:
The Code is as
When a function is used as a parameter of other functions and is called independently, the writing method is different. The former does not need to append (), while the latter must add ()
The Code is as follows:
Untitled document
The setCapture function is used to send subsequent mouse events to this object. releaseCapture is used to return the mouse events, which are handled by documents, windows, and objects. This ensures that the drag process will not be disturbed by
When the user clicks the scroll bar, we can assume that he or she is browsing the chat content, at this time, a good user experience will not allow the scroll bar to automatically scroll. For example, in a chat room on a webpage, the scroll bar will
Sometimes a dialog box is displayed when you click a button or text. For convenience, you can write a plug-in to facilitate future use. The html is as follows:
The Code is as follows:
When you need to attach data to the ComboBox and assign the initial selected items, if it is written after store. load (), for example:
The Code is as follows:
EditCityStore. load ({params: {provinceID: proid });Ext. getCmp ('city-id-name').
My template system is upgraded to a lower level and will continue to be used in new companies. Today, Internet companies do not need javascript templates. What are TX, Baidu, Sina, 360, and so on? Finally, the popularity of waterfall stream, there
JQuery is a way to get the same level value. For example, if you are in the GridView, the implementation code is as follows. For more information, see
The Code is as follows:
" name="chkReceipt">
">
">
Javascript advanced Article 3 Introduction to Ajax, JSON, and Prototype. For details about js learning, refer
AjaxI have heard a lot about this word, but I have never really touched it, so I 'd like to know it here.
The innovation of Ajax technology
A pop-up window is often used to develop websites. Today, I found a small plug-in LeanModal on the Internet, which is recorded here for your convenience, it is also convenient for others to use the development website and often uses the pop-up
If there is an error in the article, I hope to help me correct it ~ I am also learning while watching videos. This is a note ~ I think the summary will save some time than watching videos ~ It can help others better ~ If I can't help, I can at least
CSS, I don't think so .. However, because of my own failure, I still want to add it here. The full name of CSS is cascading style Sheet. The Chinese name is Cascade style sheet, also known as cascading style Sheet. The advantage is that the code can
I have learned some basic web development knowledge in those years, including the javascript language. Why do I need to learn Jquery? Jquery is a library written by javascript, it provides us with a lot of common methods, which can be compatible
A special customer requirement: to display data in a table on a page, the data volume is not large. If you do not want to use the browser's scroll bar, you can only scroll The data in the table in the Div, however, there is a special requirement
Recently, I decided to refresh node. js and use it to merge JS files. Because I forgot about it, let's see if I can output a page first. Below are some of my notes, saving you the trouble to forget the installation process. If it succeeds, you can
In Firefox, the time can be obtained normally, but in IE7 it is NaN. After a long time, I gave up newdate and then found the segment code in a foreign forum to be compatible with the formatting Date Code of all browsers.
The Code is as follows:
When we do the search box, we often need this effect: the search box displays a text prompt by default, such as "enter a keyword". After you click the mouse, clear the text. Click another place and restore the text, such as the search box on your
Javascript excludes appreciate some typical js Code sorting. If you are studying Javascript, refer to the following 1. Get the integer and convert it to the numeric type:
'10. 567890 '| 0
Result: 10
'10. 567890 '^ 0
Result: 10
-2.23456789 | 0
Result:
To make the page Load faster, you often need to compress the javascriptcss code to reduce the size. Here we will briefly list the used compression tools and use them as an archive.
UglifyJS
UglifyJS is a code compression tool built on the nodeJS
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