Javascript note (3)

Chapter 9: event 1. DOM event stream Dom supports two types of event models: Bubble event and capture event. bubble events: events are triggered in the order of the least specific event targets. capture event: the opposite process. 2. event

Javascript time difference function

Original article: http://www.cnblogs.com/donghongtao/archive/2010/10/12/1848640.html     function getdatediff (starttime, endtime, difftype) {// convert the time format of XXXX-XX, format: starttime = starttime. replace (/\-/g, "/"); endtime =

Javascript uses prototype to implement OOP inheritance

With the prototype feature, you can easily inherit the methods and attributes of the parent class in the subclass. In the following example, vegetable is treated as the parent class, and celery is treated as a subclass. Vegetable has the property

Javascript DOM node type (nodetype)

Dom node type, which is useful in traversal and can be used to filter nodes that do not care about. For example: Function showpageattr () {var divimgshowarea = document. getelementbyid ('divimgshowarea '); var nodes = divimgshowarea. childnodes;

Javascript: How does one automatically close the window opened by showmodaldialog after submission?

There is a form in showmodaldialog. It is easy to use JavaScript to directly close this window after the user submits this form. However, after debugging for a long time, although the original window is closed, however, a blank window is always

Javascript FSO attributes

What is FSO? FSO is a file system object. It is a technology used to list windows disk directories and files and delete, create, copy, cut, and move directories and files. Benefits of using the FSO Website: directly read files and subdirectories

Be sure to identify the escape characters using regular expressions in JavaScript !!!

Preface: Some time ago, we tested the following special symbols. The javascript code is as follows: ['~! @ # $ ^ & * () = | {};: '"., [\]./? ~ @ # & * {}] The result shows that \ cannot be matched, so the code is corrected ['~! @ # $ ^ & * () = | {}

Javascript system folder file operations (very powerful)

In the early stage, system operations were performed under. net, and the implementation of the same functions was very complicated. I didn't expect JavaScript to be so simple, so I searched the code online and improved it. Function pathlist (PATH)

JavaScript to obtain system hardware information

Win32_processor // The CPU processor win32_physicalmemory // The physical memory win32_keyboard // The keyboard win32_pointingdevice // The vertex input device, for example, the mouse win32_diskdrive // hard drive drivers // disc drive

Conversion between JavaScript objects and strings

JavaScript Object definition method 1. var OBJ = new object () New Document 2. var OBJ = {}; New Document You can also initialize the value at definition: VaR OBJ = {key: '11 '}; How to convert an object to a string If you directly

How to add event functions to page elements using JavaScript

Preface HTML itself has event-triggered attributes, such as onclick, onmouseover ,..... View Code directly (Note: This document uses onclick as an example) New Document This example is simple, but if the following conditions occur: 1. The onclick

The difference between undefined, null, and Nan in Javascript

JS Data Type Before introducing the differences between the three, let's take a look at the JS data types. In a language such as Java and C, before using a variable, you must first define the variable and specify its data type, which is an integer,

How to use JavaScript to zoom in and out SVG images on webpages

  First, describe the webpage effect I want to make. Basically, after placing the mouse over the image, the scroll mouse pulley can zoom in and out the image, after you press the mouse, move the mouse to move the image. You can see the specific

Have you really understood JavaScript?

Yesterday, I saw a post "so, you think you know JavaScript?" In the blog of baranovskiy, a famous front-end architect. Question 1: if (!("a" in window)) { var a = 1;}alert(a); Question 2: var a = 1, b = function a(x) { x && a(--x);

Defer attribute of JavaScript

Defer attribute in script If you are a person who cares about and cares about system performance, I think you should be interested in defer in the script. The defer attribute in script is false by default. According to the descriptions in the DHTML

Relationship between array and object in Javascript

In JavaScript, array is also an object, but some people may mistakenly think that access like a ['key'] is an array function, not actually. In the following example, after an array value is assigned, its Length attribute is still 0, because the

JavaScript code and character conversion

In JavaScript, you can use the charcodeat () function to obtain the character code. Otherwise, you can use string. fromcharcode () to obtain the characters in the code. Application 1: Base64 encoding. Use the charcodeat () function. Application 2

Javascript control text can only input numbers (integers, decimal places), compatible with IE, FF, Safari

Another one:================================== 2) {This. value = This. value. split ('. ') [0] + '. '+ this. value. split ('. ') [1]} ">

Javascript note (1)

Javascript object-oriented programming:VaR cat = { Name = '';Color = '';} VaR cat1 = {};Cat1.name = "Mao ";Cat1.color = "yellow "; VaR cat2 = {};Cat2.name = "ermao ";Cat2.color = "black "; Changes to the original mode:Function CAT (name, color

Total Pages: 5378 1 .... 2741 2742 2743 2744 2745 .... 5378 Go to: GO

Contact Us

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

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.