After analysis, we found that the webpage contains code similar to the following:Analysis: pay special attention to onerror. When the image does not exist, onerror is triggered, while onerror specifies a NoPic.gif image for img. That is to say, if
What is the difference between SUB and FUNCTION? How should their syntax be structured?Sub: process;Function: a Function that can return values.Syntax:Sub SubName (parameter 1, parameter 2 ,...)....End SubFunction FunctionName (parameter 1,
In the parent window, operate iframe: window. frames ["iframeChild" ].doc ument // If the iframe id is iframeChildOperate the parent window in the Child Window: zookeeper parent.doc umentSo, if you want to use jquery, how can we use jquery to obtain
Add the following two lines of code between the labels:Copy codeThe Code is as follows: Change :Copy codeThe Code is as follows: Write the code to be colored to the label in the following format:Copy codeThe Code is as follows:/* Source code
We know that IE6 does not support transparent PNG, which undoubtedly limits the space for webpage design.However, the entire Internet solution to this IE6 transparent PNG solution is also numerous, from the use of IE-specific filters or e-xpression,
1. Three events to be dragged, onmousedown, onmousemove, and onmouseup2. The onmousemove event is used to handle the changes in the position of the dragged element. In fact, the distance between the elements to be moved is the distance between the
In ECMAScript, all declared variables seen outside the function at the function declaration can be accessed inside the function.Final value!
Closure functions can only access the final value of a variable !!!
Eg:
Function fnTest (arr ){For (var I = 0
Copy codeThe Code is as follows:Array. prototype. del = function (){Var B = {}, c, I = 0, l = this. length, j;For (; I C = this. shift ();C in B? B [c] ++: B [c] = 0;}For (j in B ){If (B [j]> 0) this. push (+ j | j );}Return this;}Var a = [1, 2, 3, 3
* select 1-3 knowledge points. 1213123123 2123123123 3213123213 4123213213 5213123213 6213123213 "/> [Ctrl + A select all Note: If you need to introduce external Js, You need to refresh it to execute]
Direct reference node1.doc ument. getElementById (id );-- Find the node through id in the document2.doc ument. getElementByTagName (tagName );-- Returns an array containing references to these nodes.-- For example, document. getElementByTagName
Copy codeThe Code is as follows: tt Find me: Use selector and eventJQuery provides two methods to select html elements. The first method is to combine CSS with the Xpath selector to form a string to be transmitted to the jQuery Constructor (for
If Javascript is to be cross-origin, you can use: you can read data from other websites.The key is to see if your spirit is not flexible and you will use it.To cross-origin ajax, you can use the server to retrieve content from other websites, such
The style is a little ugly. For this reason, I re-create a style. When I thought it was finished, I found that the work on IE was abnormal, and the self-adaptive size could not be achieved.It used to require xhtml, while the company's products were
zoom in on the left, zoom in on the left, zoom in on the right, move on the left, move on the right, and add transparency minus linkage 1 linkage 2 [Ctrl + A select all Note: If you need to introduce external Js, You need to refresh it to execute]
I. Simplified codeUsing a shorter statement can not only reduce the number of characters entered, but also reduce the file size. The execution efficiency of most code that adopts simple writing is slightly improved.1.1 simplify definition of common
I optimized and modified a JS drag class on the Internet, and added the effect of translucent display when dragging. Http://www.jb51.net/article/16122.htmNote: For details about the Cminfo class in this document, refer:Http://www.jb51.net/article/187
// JQuery Alert Dialogs Plugin Version 1.0// Plug-in: http://abeautifulsite.net/notebook/87The original method is as follows: Copy codeThe Code is as follows:// Usage:// JAlert (message, [title, callback])// JConfirm (message, [title, callback])//
Copy codeThe Code is as follows:// Code from jb51.netFunction Person (name ){This. Name = name;}Person. prototype. SayHello = function (){Alert ('hello, '+ this. Name );}Person. prototype. SayBye = function (){Alert ('Goodbye, '+ this. Name
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.