About types
What is a type? Simply put, a type is to assign a binary sequence in the memory to some meaning. For example, binary Sequence 0100 0000 0111 0000 0001 0101 0100 1011 1100 0110 1010 0111 1110 1111 1001 if it is regarded as a 64-bit
For people who are engaged in or planning to engage in programming, object-oriented is a familiar word. Almost everyone can list some object-oriented programming languages, such as C ++, JAVA, c. In fact, object-oriented thinking is independent of
// Write the cookie function SetCookie (name, value) // two parameters, one is the cookie name and the other is the value {var Days = 30; // This cookie will be saved for 30 days var exp = new Date (); // new Date ("December 31,999 8"); exp. setTime
Multiple loops are often encountered in programming. In JavaScript, how can we specify the loop that jumps out of that layer. In fact, this is also a use of break. Below is a good example, from the JavaScript authoritative guide, you can refer:Code
JavaScript is a scripting language, but it is also a language with powerful features.
JavaScript is related to Java, but only the similarity of basic keywords is retained, which is far less closely related to C # and Java.
C #3.0 and later
As a programmer, you may have been used to the reference (or pointer) of the current object in object-oriented language, such as this in c ++ or self in python, of course, javascript with OO attributes (javascript is actually more of a so-called
The highlight function highlights the text in the specified area on the page, that is, the background color. This function is often used on the search results page.
The following provides a solution that is implemented using javascript.
First
Front-end development should learn to mean:
Mean your code and use the least code to do the most appropriate thing;
For example, if you use document. getElementById () in your code, do you want to write a simple ID selector.
function $(Id){
Convert to boolean
Use two non-operations (!) :
!!5 ==> true
Use a Boolean constructor:
new Boolean(5) == > true
Convert value to boolean type: false: 0, + 0,-0, NaN, "" (empty string), undefined, null
Other values except the preceding values
JavaScript is a dynamic language based on objects and is event-driven. From the perspective of Object-oriented thinking, it also has the concept of class. JavaScript does not have the class keyword, but is implemented using function.1.
I used this article to clarify my own ideas, and hope to clarify my ideas for those who have the same understanding as me. The error code is as follows:
var o = { ...}var obj = new o();
Needless to say, of course, an error is returned.
You can use prototype to define some convenient custom functions and implement various custom functions.
The working principle of prototype in Javascript. Every time a new function is declared in javascript, a prototype attribute is created for it.
Regular expressions are used for string processing, form verification, and other occasions. They are practical and efficient, but they are always not sure when used, so they often need to be checked online. I will add some frequently-used
The implementation of row dragging is very simple. Select a row, drag it up to exchange the position with the above row, and drag it down to switch the position with the following row. The question is how to get the exchange row. I have seen a very
PHP print_r functions are very useful and can be used to print the structure and data of arrays and objects. Unfortunately, JavaScript does not provide similar functions in the native. However, we can try to implement this function by ourselves. The
Today, I reviewed how javascript is used to create and store cookies. I would like to share some of my experiences with you. First, let's take a look at the basic knowledge:What is cookie?
Cookie is a variable stored on the visitor's computer. This
In JavaScript, time processing is often used. Recently, I want to build my own code library, sort out several js processing time functions that I used earlier, and share them with you. The code library will be added and modified in the
In this era where js frameworks run around, have you ever considered writing your own framework? The following content may be helpful.What should a framework contain?
1. Language extension
Most existing frameworks provide this part of content.
Recently, when I was reading the code written by a colleague, there was a string with a bunch of "+" numbers. After reading the code for half a day, what content will be output tomorrow, just think of a class connected with a string, and write the
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