Javascript drag and Scale Effect

The drag and scale here is a little more complex than the general selection box. You can set a fixed trigger point of eight orientations (directions), and set the minimum range, maximum range, and proportional scaling. Same as drag-and-drop,

Javascript trap window Global Object

Function Test (){ This. Name = 'test '; VaR name = 2; This. Show = function (){ Alert (name ); Alert (this. Name); // display name } } VaR test = new test (); // create an object through the constructor Test. Show (); // output 2 and 'test',

Page Layout refresh effect implemented by JavaScript

CodeAs follows: Copy codeThe Code is as follows: The page content is refreshedCopy codeThe Code is as follows: Document. getelementbyid ("infoa"). SRC require 'B .htm' Is it clear That Ajax is usually used? Do you still have no

Improved JavaScript read URL parameters

function geturlarg (seekarg) { var url = location. href; // use regular expressions to separate the parameters between the question mark and the well number, such as from the http://www.jb51.net/testjs.htm? P = 1 & t = 1 & U = 1 # In test, P = 1 &

JavaScript "accidentally called method or attribute access" in IE"

Same paragraph Code , Two calls, one pass, and one exception: Function clearselect (OBJ ){ If (OBJ & obj. Options) OBJ. Options. Length = 0; } The following are some previous experiences: These are two classic exceptions, which are difficult to

Javascript namespace to improve code reusability

After more than 10 JS files are introduced to the same webpage, Functions with the same name in each JS are prone to conflicts. For example, the addcssstyle method is written in the xxx library, The YYY Library also writes an addcssstyle method, The

JavaScript Functions, methods, and object code

Function quantity. It is applicable to functions that are only used once and do not need to be named. In the following example, although there is a fact function name, the latter is only used for self-calling. CopyCode The Code is as follows: var F

Summary of JavaScript beginners

Summary of JS learning today: When will the script be executed: 1. Execute the script when opening the page When the browser opens an HTML document, it will explain the entire document from the beginning, including HTML tags and scripts. If the

Javascript common drag-and-drop code

Xmlns = "http://www.w3.org/1999/xhtml"> Background-color: # f00; text-align: center; cursor: move; "onmousedown =" Var WC = This; D. Start (WC, null, function (property ){VaR node = WC. parentnode;VaR A = D. pos (node), B = D. pos (WC

Javascript has not implemented the error Solution

No error message is displayed in firebug. When you open IE, you will encounter a "not implemented error". No errors have been found in the past based on the location indicated in IE. It seems that the error location of IE is not accurate. In

Javascript simulated drop-down menu code

Advantage: You can also click the body area to hide the drop-down menu and it does not conflict with the existing onclick event of the body. Disadvantages: Please point it out and accept it modestly! Run box Code It seems that there are so many

Performance of javascript string connection (multiple browsers)

Test included in the book Code As follows: Copy code The Code is as follows: example Note: the latest versions of Firefox seem to have fixed the String concatenation problem. if you are using Firefox 1.0 or later, the string buffer may be

Collect the seven rules of non-abrupt JavaScript code on page 1/2

1. Do not make any assumptions (JavaScript is an unreliable Assistant) One of the most important features of JavaScript that may not be abrupt is-you have to stop any assumptions: * Do not assume that JavaScript is available. You 'd better think

Add Event code dynamically in Javascript

Method 1: setattribute VaR OBJ = Document. getelementbyid ("OBJ "); OBJ. setattribute ("onclick", "javascript: Alert ('test ');"); Here, setattribute is used to specify the onclick attribute, which is simple and easy to understand, However, ie does

Javascript birth date and ID card judgment

If (document. form1.csrq. value = ""){ Alert ("Enter the date of birth! "); Document. form1.csrq. Focus (); Return false; } If (document. form1.csrq. value = ""){ Alert ("Enter the date of birth! "); Document. form1.csrq. Focus (); Return false; }

Code for passing data between JavaScript forms

1. The simplest thing is to transfer data from forms on the same webpage. For example, a webpage has two forms, one text box and one button in each form. Click the button to operate on the value of the text box of the other party. The example here

Explanation of JavaScript objects

All constructors are objects, and not all objects are constructors. Each constructor has a prototype attribute used to implement prototype inheritance and share attributes. An object is created using a new expression. For example, a new string ("A

Test JavaScript multithreading page 1/2

The magic weapon is concurrent. Thread, which is actually a JS library. You can download it from the website. Source code . How to use it? Simple Concurrent. thread. create (F, A1, A2 ,...) f. For the function to be called, A1 and A2 are the

Complete JavaScript checkbox selection, cancel all selection, and delete code

See the following two implementation methods: JS checkbox Method 1: CopyCode The Code is as follows: function checkall () { VaR code_values = Document. All ['Code _ value']; If (code_values.length ){ For (VAR I = 0; I { Code_values [I]. Checked

JavaScript code for selecting multiple rectangle blocks (simulating the CS structure)

"> /CSS/font.css "rel =" stylesheet "type =" text/CSS "> strat id end ID -->

Total Pages: 5378 1 .... 2545 2546 2547 2548 2549 .... 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.