For any JavaScript program, the JavaScript interpreter Initializes a global object for use by the program when the program starts running. The functionality of the global objects provided by this JavaScript itself includes:
1. Global objects have
Summary:We often encounter in the development process to get or change the DOM elements through JS style, there are many methods, such as: by changing the DOM element class. Now we're going to talk about native JS to get the CSS style for DOM
The simple point is that string is a character (string) ...And the array is arrays ... Can put numbers ah, character Ah and a series of Dongdong!!!
Last Example:
Copy Code code as follows:
var str = "Liuzhanqi";
document.write
ECMA-262 defines an object as: "A collection of unordered attributes, whose properties can contain basic values, objects, or functions"
The easiest way to understand an object is by creating an instance of object and then adding properties and
In JavaScript, the = = and = = operators can be used to determine whether two values are equal; the difference is that if the two value types that are judged are inconsistent, the = = operator returns false directly, and the = = operator is then
The examples in this article describe a way to pass data between JavaScript browser windows. Share to everyone for your reference. The specific analysis is as follows:
Summary:
In the project development we often encounter the window, some through
Two ways to change the src attribute of a picture:
The 1,setattribute method is part of the "level 1th dom", which can set any property of an element node.
2,ELEMENT.SRC = Source; This is the way before "level 1th dom" appears, and it is now valid.
Disadvantages of Synchronizing form checksums
In response to the error message, the entire page needs to be reloaded (although there is a cache, the client still needs to compare each file with the HTTP protocol to keep the file up to date)After
A JavaScript object is a composite value that is a collection of attributes or named values, by means of the symbol "." To refer to the attribute value, when the property value is a function, we call it the method. We see that strings also have
All numbers in JavaScript, whether integer or decimal, have a type of number. Within a program, the essence of the number type is a 64-bit float, which is consistent with the floating-point numbers in Java, so all the numbers in JavaScript are
All along, the understanding of this is only available, it can be used, but it does not delve into its essence. This time, through the "JavaScript The Good Parts", made a profound understanding. (All debugging can be seen in the console, browser F12
I used to use printf debugging, and since then I seem to have been able to solve bugs faster.In some cases a better tool is needed, and here are some of the best, and I'm sure you'll find something useful about them:
1. Debugger;
You can use
JS Monitor Browser return event, you can support ie6+, Firefox, Google and other browsers.
Copy Code code as follows:
So, how do I capture the carriage return event for a specified DOM object? Here take the
When debugging a JavaScript program, you sometimes need to dump some of the object's details. This work can be done by writing JavaScript code by hand: Looping through the properties of the object, printing each property value that is looping to it,
This article describes the JavaScript implementation time format output FormatDate function. Share to everyone for your reference. Specifically as follows:
JavaScript does not provide a function to enter the date-time content format as FMT
Read the JavaScript page special Effects Example Encyclopedia of the effect of the example, feel worthwhile to learn.
Change the picture to snowflake, complete the effect of a snowflake drift.
And, some of the content is older, then the scholar to
Drag the principle: in fact, the mouse and the upper left corner of the distance remain unchanged. Let's look at the picture below, the red dot is the mouse.
Drag and drop is actually the position of the mouse to calculate the position of the
The effect you want to implement here is to set and remove the default text box, and the gray word disappears when the mouse is placed in the text box.
1. You can use the simple way to add the onfocus attribute to the input text box, the
The example in this article describes the use of JavaScript reference assignment (address-passing value). Share to everyone for your reference. Specifically as follows:
JavaScript by default, arrays, objects, and functions are reference assignments,
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.