Although XML has been widely used in many applications, it is not perfect. Especially in AJAX applications, XMLHttpRequest checks the MIME type of the returned data, XMLHttpRequest runs XML Parser to parse the returned documents and build the
Removes spaces between the left and right sides of a string. In most programming languages, such as PHP and vbscript, trim, ltrim, or rtrim can be easily implemented. However, these three built-in methods are not available in js and need to be
During development, we often need to determine whether an object is of the array type. In Js, what common methods are used to detect the object type?Typeof Operator
For Function, String, Number, Undefined, and other types of objects, it is fully
When I was a beginner at JS, I knew about this function, but I never knew about its purpose. I always kept one eye closed and one eye closed. This time I will take a deeper look at the role of this function.
The function of eval is actually very
Sometimes we need to verify the parent form in iframe, which is actually very simple. In iframe, we can use the parent keyword to call the javascript function of the parent page. The following is an actual problem I encountered in the project. For
What is JSONP?
JSONP is an unofficial protocol that allows the server to integrate Script tags to return to the client and implement cross-origin access through javascript callback (this is only a simple implementation form of JSONP ).How to Use
Rotate the image 360 degrees for one week. Compatible with all browsers. IE: matirx filter webkit: webkitTransform Opera: OTransform firefox: transform.
For a very dazzling JavaScript effect, refer to its programming skills.Effect demonstration
You can see this method in some Javascript libraries:
Function () {// code of all databases }();
One purpose of this writing is encapsulation.
JavaScript is not object-oriented, so it does not support encapsulation. However, encapsulation can
The syntax of the replace function is stringObj. replace (rgExp, replaceText) Where stringObj is a string, reExp can be a regular expression object (RegExp) or a string (string), and replaceText is a replacement string found. For better
JavaScript is an interpreted language without a doubt, but does it parse it from top to bottom at runtime? In fact, this does not prove to be the case. I learned through the JavaScript authoritative guide and relevant information on the Internet
I recently saw a new Javascript applet, Streams, on the Internet. I thought it was a common Javascript class library, but after reading the introduction about it, I found that, this is not a simple class library, and the author's focus is not on the
When url is used for parameter transfer, some parameters or URL addresses with Chinese names are often passed, and conversion errors may occur during backend processing. In some transfer pages, GB2312 is used, and UTF8 is used on the receiving page.
The W3C team's head was kicked off until javascript1.8.1 supported the trim function (with trimLeft and trimRight). Unfortunately, only firefox3.5 supported it now. Since the blank spaces on both sides of the string are too common, all major types
JavaScript object-oriented programming is somewhat different from other OO languages. Therefore, when using JavaScript object-oriented features, you need to pay attention to some normative issues. Next, let's briefly talk about how JavaScript
In JavaScript development, various types of Date objects are often required to be verified or formatted. However, js does not provide so many fine functions, so we have to expand it with prototype, the following is a commonly used Date operation
The drag layer is useful in Web design. For example, in some applications that require custom layout, the control needs to be dragged. The following describes how to meet your needs, by the way, you can learn how to implement the drag layer.
The
The results of Regular Expressions in JavaScript may be different in different browsers. The following describes the regular expressions in five mainstream browsers (IE, Firefox, Chrome, Safari, Opera, take the current version as the standard.
1.
The reflection mechanism means that the program can obtain its own information at runtime. For example, an object can know its methods and attributes at runtime. In JavaScript, there is a very convenient syntax for reflection, that is, (... In ...)
For those familiar with C # and Java, the three main object-oriented ideas (encapsulation, inheritance, and polymorphism) must understand. So how can we use this feature in Javascript?
We will abstract some things in reality into a Class, and take
The following is a formatting function that controls the number of decimal places and is automatically rounded down. For example, 12345 is formatted as 12,345.00, 12345.6 is formatted as 12,345.60, and 12345.67 is formatted as 12,345.67, leaving
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.