We know the code for getting the class name of a JavaScript user-defined class, although JavaScript is an object-based language. However, with its prototype feature, we can fully implement a very sexy OO compiling framework. Here we can look at the
Code that uses Div to simulate the showModalDialog mode menu effect today studies how to use javascript and p to create the display mode form of the current form, and a small example that makes the subform unable to operate!
I can refer to some of
Take the brother node of a DOM element and use the native JS Code to do it in the form of jQuery's siblings method.
The Code is as follows:
Function siblings (o) {// The parameter o is the sibling node of the user who wants to retrieve the
How to solve IE6789 parsing exceptions caused by transparent Settings Using filters. For more information, see. As follows:
The Code is as follows:
Use the IE developer tool or the developer tool that comes with IE8. The structure is as
It is relatively simple to implement array sorting in js by using the sort method in the array. The following is a good example. You can refer to how to implement array sorting in js, using the sort method in the array is relatively simple:
I.
Recently I wrote a countdown program, because it often needs to be accessed on the mobile phone end, so jquery is not referenced. I am not used to jquery. The following describes the js date-related functions and the principle of countdown.
The
There are many ways to jump to another page. This article will show you in detail how to jump to another page in js 5 seconds later. Do not miss it if you are interested.
The Code is as follows:
Jump to another page in 5 seconds
There are two dedicated timer functions in javascrui. The following describes the two timers. If you need them, refer to 1. countdown timer: timename = setTimeout ("function ();", delaytime );
2. Cyclic Timer: timename = setInterval ("function ();",
There are many ways to disable the keyboard function keys. This article describes in detail how to disable the keyboard function keys and other keys using javascript. For more information, see
The Code is as follows:
After you insert the
This code is a simple example. Extract two random images from the five images in the first div and display them to the second div. The specific implementation is as follows, if you are interested, you can randomly add images in the First dom to the
Function declarations and function expressions in javascript are frequently used, and many friends may not know the differences between them. I would like to introduce them in detail and hope they will help you the same way, first run the Code:
This article introduces the differences in the use of window. location. For more information, see window. location. href = & http://www.webjx.com/javascript/ldquow.url#:to change the URL address;
Window. location. replace ("url"): replace the
First, use the flag. The following Code sets the checkSubmitFlg flag. Second, set it in the onsubmit event to invalidate the submit button after the first submission. If you are interested, you can understand it.
First:Use the flag. The following
You can use the CSS override method, but the official website does not allow this method. The specific implementation is as follows. If you are interested, you can refer to the CSS override method, but the official is not allowed to do so, refer to:
The js tool method pops up a mask. If you need it, refer to it.
The Code is as follows:
// Tool method pop-up mask add by dning 2012-11-4Var maskShow = (function (){Var mask = null;Var curr = null;Var free = false;Var func = {Onresize:
Examples of multiple methods of JavaScript implementation classes. For more information, see constructor.
The Code is as follows:
Function coder (){This. name = 'modern magic ';This. job = 'web developer ';This. coding = function (){Alert ('Code I
A tab. When the mouse moves up, the red slider follows and is often used during the layout process. This article provides detailed implementation code. If you are interested, refer to the next one.
Move the mouse to the corresponding category, and
Record the code snippet that I have to like after seeing it. The content of this clipboard will be updated constantly. Please pay attention to the Dynamic Construction of regular expressions.
The Code is as follows:
New RegExp (Expr. match [type].
When we do some questions about online membership, we often need to determine whether the user is offline based on whether the browser is closed, and then remove the user from the session and application, next, I will share with you the specific
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.