Many times, when browsing the web, we need to consider the user accidentally close the window, especially when the user has very important data has not been saved, our program is necessary to remind users. This time we can use JavaScript
The example of this article summarizes the JS pop-up dialog box mode. Share to everyone for your reference, specific as follows:
Commonly used is the alert prompt confirm three kinds of dialog boxes
Example 1:
example Simple dialog box
This example describes the method for JS to change the option attribute in select. Share to everyone for your reference. Specifically as follows:
Help a friend solve a small problem, the requirement is to change the text value displayed in the
The example of this article is about how to change the content display area of JS. Share to everyone for your reference. Specifically as follows:
This shows the effect of the drag-and-drop content display area, drag the red bar left and right to
This article describes the JS implementation of the simulation Baidu search "2012 Doomsday" Web page seismic tearing effect code. Share to everyone for your reference, specific as follows:
This is a JS simulation Baidu search "2012 Doomsday" page
This article describes the JS implementation of the Web page every 3 seconds Pop-up dialog box method. Share to everyone for your reference, specific as follows:
The screenshot of the running effect is as follows:
The online demo address is as
Site in order to prevent malicious access to the verification of text messages, verify the mailbox, will be clicked to get the verification code button to do a countdown effect. Implement this function, a setinterval and a clearinterval can be done,
What is JS cross domain na?
JS Cross-domain refers to the data transmission or communication between different domains through JS, such as using AJAX to request data from a different domain, or through JS to obtain the information in the frame
The example of this article is about the result of the car-mark picture hint that JS realizes. Share to everyone for your reference. Specifically as follows:
This is a JavaScript based mouse prompt effect, name car logo display hint effect-the
The example of this article describes the implementation of JS can expand the folding layer of the mouse drag effect. Share to everyone for your reference. Specifically as follows:
This is a simple JS code implementation of the mouse drag layer
First of all to see the JS image of the Carousel effect, the following figure
Specific ideas:
One, the page load, get the entire container, all put the digital index Li and put the picture list of the UL, the definition put the timer variable,
This example describes how JS uses regular expressions to remove repeated characters from a string. Share to everyone for your reference, specific as follows:
This shows a simple JavaScript regular expression instance that filters out a string of
The example of this article tells JS use cookies to implement a div prompt box display only once. Share to everyone for your reference, specific as follows:
The use of JavaScript cookie Technology, control page of the hint Div only show once, that
The example of this article tells the JS Implementation slide text box scaling extension effect code. Share to everyone for your reference, specific as follows:
Here to introduce the slide text box scaling extension effect, I have nothing to write,
This method can cancel the timer set by the SetInterval () method.
The parameter of this method must be the return value of the corresponding Setinerval () method to be canceled.
Click to see the properties and methods for more window objects.
This article describes the JS implementation can be customized size, you can double-click the closure of the pop-up layer effect. Share to everyone for your reference. Specifically as follows:
This is a JS pop-up layer, can be customized size,
Now many forums and blogs in the user registration to add the ability to verify the password strength, in the previous article, we have given a section of the test password strength example, today to see A and "JS Password strength check" code.
Cross-domain
Although the existence of homologous strategy, but in JS is still very common across domains, there are document.domain, window.name, photo ping, Jsonp, CORS, here a simple summary of the picture Ping, Jsonp and CORS memo.
Picture
1.0 quoted Js,css
3.0 Simple Setup Style
The contents of 4.0 body
Designated Team View Projects User audit View users Other content Super Admin Backstage Exit
This article illustrates the method of JS to realize the effect of the picture highlighting. Share to everyone for your reference, specific as follows:
Yesterday friends let me help to do a picture highlighting the effect, although not difficult,
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