First, the use of JS to manipulate the CSS properties of the wording
1, for no underlined CSS properties are generally directly using style. Property name.
such as: obj.style.margin,obj.style.width,obj.style.left,obj.style.position
2, for the CSS
Effects: Mouse move into the picture stop scrolling, mouse out of the automatic scrolling
You can adjust the left or right direction to scroll
Copy Code code as follows:
Copy Code code as follows:
Go left
Go
These two days to see the GitHub of a great God, know that he is more interested in the algorithm, looked at one of the algorithm to calculate the number of steps, feeling this is a bit interesting, so I realized one.
Algorithm description and
New parent Window page:
Add the following script
Copy Code code as follows:
First
To create a second.html page:
Copy Code code as follows:
second
-->
Backcolor= "White" font-size=
Today in the project to use the pop-up window, think of two ways to implement using JavaScript, one is window.open (), one is the window.showModalDialog () method, the latter is a parent-child relationship of a pop-up window, only the child window
Often found in the writing JavaScript, all need to use the Web page, browser or screen height and width to solve the layout of the problem, often used to forget before, or in the online search, simply summed up their own, so also convenient to use
Regular expression:
((2[0-4]\d|25[0-5]| [01]?\d\d?] \.) {3} (2[0-4]\d|25[0-5]| [01]?\d\d?]
((2[0-4]\d| 25[0-5]| [01]?\d\d?] \.) {3} (2[0-4]\d|25[0-5]| [01]?\d\d?]
The red block represents: the first character is 2, the second character is 0 to 4,
If you need to know when your code executes during Web debugging, you can use the Console.time () statement and the Console.timeend () statement to time the execution of your program in JavaScript code. Take this longer-consuming Foo () function for
Recently in a project to monitor video playback events and be able to print log log, after some thinking, using JavaScript to achieve this function, the code is as follows:
Html:
Copy Code code as follows:
multi source
The example of this article analyzes JavaScript string browser compatibility issues. Share to everyone for your reference. The specific analysis is as follows:
First look at the incompatibility of the writing, if I want to get a string of the first
Appearance mode description
Description: The appearance pattern is used to provide a high-level interface interface for the complexity of subsystem or program composition, and it is easier to access the underlying program or system interface with
Before the incident bubbling problem, also went to the internet to search for some, the results are mostly the same code, posted to the time is not very smooth. When it comes to FF, you can use E.stoppropagation (); , somehow I didn't succeed.
The example in this article describes the way JavaScript parses JSON. Share to everyone for your reference. The specific methods are as follows:
Download the JSON libraryHttp://www.json.org/json-zh.html himself for JavaScript.Or just go down
For variables of scope (scope), C, Java and other languages take the form of "block scope". In contrast, JavaScript takes the form of "function scope"-The scope of a variable is determined only by its function, regardless of the logical block of if,
Implementation effect: When the scroll bar is pulled, the picture appears in the visible area before it starts loading
Ideas:
(1) img tag, put the real picture address, placed in the properties of their own settings, such as Lazy-src
(2) Get the
Copy Code code as follows:
1000 seconds after automatic jump, if not jump, please click the link below My Baidu
The code is very simple, but very practical, small partners in accordance with their own needs to put into their own projects.
One, general summary
1, the author discusses
We make a simple analogy from everyday life, we go to the housing intermediary rental, housing intermediaries between the tenant and landlord lessors form an intermediary. The tenant does not care about
In JavaScript, because the length of an array is variable, you can add it to an array by directly defining a new member:
Copy Code code as follows:
var o = [2,3,5];
O[3] = 7;
Console.log (o);//[2,3,5,7]
In addition to this
This algorithm is for reference only, the small dish basic not understand the advanced algorithm, can only use the most simple thought to express.
Copy Code code as follows:
Finds the first character in a string that is not repeated
In this paper, the slice () method of String objects in JavaScript is analyzed in detail. Share to everyone for your reference. The specific analysis is as follows:
This method intercepts a paragraph in the string and returns a new string
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