One recent project encountered a pit, which is an array reference to a JS string:
Javascript
var str = ' ABCDEFG ';A character that refers to the 3rd position of the stringAlert (str[2]);Most browsers output normal value of C; However, some
I used the Arr.concat (arr2) method to append an array, as shown in the following example
The code is as follows
Copy Code
JS array elements to add and delete has been more puzzled, today finally found the
The first argument to call () and apply () is the object of the function to invoke, which is the value of this keyword in the function body.
The remaining arguments for call () are the values passed to the function to be invoked.
The structure is
This is also generally recommended in the way, because you do not know what the different JS engine will not pass the sorting function, according to what scheme to sort.For example:
The code is as follows
Copy Code
var
Effect chart
Source
The code is as follows
Copy Code
JS Super cool Digital clock
Super cool digital Clock download address: http://file.111cn.net/upload/2013/10/ac.zip
Implementation principle
The realization of this function is very simple, in a nutshell is to find a place to save some information on the page, if the page two times are visited, the new content to cover up the old content; When the page loads,
Cookie Base Usage
A. Simple access operation
When using JavaScript to access cookies, you must use the cookie property of the Document object; a line of code describes how to create and modify a cookie:
The code is as follows
The number of times specified to execute the same code block in JavaScript or the specified condition is true.
ExampleWhileHow to write a while loop. Use the while loop to run the same code block, and the specified condition is true.
Html>
JavaScript functions:• General functions• Array functions• Date function• Mathematical Functions• String Functions. cookie function1. General functionsJavaScript general functions include the following 9 functions:(1) Alert function: Displays a
JavaScript: This particular protocol type declares that the subject of the URL is arbitrary JavaScript code, which is run by the JavaScript interpreter.For example, the following dead link:href= "javascript:void (0)">No response linkA >The way to
This article by the code Farm-small peak original, reproduced please see the text at the end of the reprint requirements, welcome to participate in our paid contribution program!For those who like to write technical blog, must be very familiar with
More than half of the December, Winter is a wonderful season, the cold air forcing people to hide in a comfortable environment to live. Winter will give a quiet and peaceful atmosphere, let people immersed in it, as if the end of an old stage, but
Complete example of online color acquisition for RGB web pages implemented by JS, and rgb color Extraction
The example in this article describes the RGB web page color online color filter implemented by JS. We will share this with you for your
It is best to use the Bootstrap fileinput. js File Upload Component and the bootstrap Upload Component.
This article describes how to use bootstrap fileinput. js (the best File Upload Component) to display and upload images, including saving
A complete example of Tetris game implemented by JS + Canvas, canvas Tetris
This article describes the Tetris game implemented by JS + Canvas. We will share this with you for your reference. The details are as follows:
Try-on (compatibility with
We recommend that you Disable chrome cache [Disable cache (while DevTools open)] and chromedevtools during development.
Problem: After css and JS are modified, chrome cannot see the effect.
Specific scenario: I recently wrote a PHPbbs file. When I
High-performance JavaScript data storage and javascript Data Storage
1. Four Basic Data Access Locations in JavaScript: literally, local variables, array elements, and object members.
Generally speaking: [literal, local variable] running speed>
// Step 6: modify the moderatorFunction On_ChangeMaster () {// Exit if no Forum is selectedIf (frmManager. selForumName. selectedIndex =-1) {Return 0; } If (frmManager. btnChangeMaster. value = "modify ") {FrmManager.
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