Today, I saw this very good article on the blog of rainweb.ArticleI think it is very necessary to share this article. I believe that after reading this article carefully, the understanding of JS scopes will go up to a new level.
In JavaScript,
You can save this page and upload it to your website. In this way, you have a base64 encryption and decryption function page, allowing users to access your webpage.
base64 encryption base64
We can judge characters or numbers based on the event. keycode of the onkeydown event, that is, ASCII chart. ASCII code corresponding to the relevant keyboard key:
Refer to the following JavaScript code :
CopyCode The Code is as follows:
In
This class library helps you effectively process related dates. Hope you like it!
Main features:3.2kb ultra-lightweightIndependent class library, which means you do not need to add a bunch of JSDate Processing supports UNIX timestamp, String,
Compared with the in operator, for in traverses the prototype chain during the attributes of the loop object. for in does not read non-enumeration attributes, such as The length attribute of an array. Summary when detecting whether an object has a
In JavaScript, The hasOwnProperty function returns a Boolean value indicating whether an object has a property with a specified name.
HasOwnProperty () usage:
Object. hasOwnProperty (proName)The parameter object is required. An instance of an object.
Document directory
Prototype inheritance
This article is also published in another independent blog Javascript: from prototype to inheritance (1)
The prototype chain of Semantic Script has always been a difficult point. This article is a
The current page has a variety of page effects, commonly used pop-up layer effects, seamless scrolling effect, Tab switching effect. Today, I will share a switch between tabs written in native javascript. Due to my limited level, please note if you
The textarea element has been widely used in Web IDE. Generally, the textarea editor provided by the website cannot meet our needs. As a developer, we often need to edit code online and highlight code. Therefore, through other open-source projects,
I told you how to move people in the first two lectures. Today, let's take a look at how to implement the situational dialogue similar to the legend of the Three Kingdoms. The specific link is shown below.
I. Preface
I believe everyone will remember
Today I have made several tutorials on how to use asp.net with Javascript. Now let's look back at the Javascript scripts, which are not well written and too complicated. Extracted and reconstructed.
Previous 1:
Copy codeThe Code is as follows:
Preface
In the previous article, we defined matrices. In this article, we will add some common methods to matrices.
ToString Method The toString method is usually used to convert an object into a string description, so we define this method as an
This article will review the basic syntax in the ECMAScript specification. Good English friends can directly read the official documentation. JavaScript is essentially a type of C language. If you are familiar with C language, you can easily read
Today, when studying a system, we found that its code has such a structure (simplified ):
Copy codeThe Code is as follows: var result = false;
Point:
{
Var obj = {key: 1 };
For (var key in obj ){
//...
Break point;
}
Result = true;
}
1. Components of most browsers
The three components at the bottom layer are the network, UI backend, and js interpreter. The function is as follows:(1) network-used to complete network calls, such as http requests. It has platform-independent
Introduction
In this chapter, we will introduce closure, a common topic in JavaScript ). In fact, we have all talked about closures. However, we should try to discuss the closure from a theoretical point of view to see how the closure in ECMAScript
In The morning, I saw The article "JavaScript Weekly Guide" [Phase 3], in which I found an article (Extending JavaScript-The Right Way). I think it is not bad. I will share it with you through translation, this document is not translated word by
1. convert an integer to a numeric value at the same time:
'10. 567890 '| 0
Result: 10
'10. 567890 '^ 0
Result: 10
-2.23456789 | 0
Result:-2
~~ -2.23456789
Result:-2
2. date to numeric value:
Var d = + new Date (); // 1295698416792
3. convert a
So what is the difference? Let's take a look at an example:
A list of level-2 cascade dynamic drop-down lists with level-1 category id = "vSort0 ".
Copy codeThe Code is as follows:
Function changelocation (id)
{............}
...... Omitted ......
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