I created a file with the Code on the Internet:Copy codeThe Code is as follows:Http://www.w3.org/TR/html4/loose.dtd>! Excerpted from "Mastering Dojo ",! Published by The Pragmatic Bookshelf.! Copyrights apply to this code. It may not be used to
Today's learning combined with yesterday's JavaScriptDOM content makes me very clear about this. JQuery principle: "write less, do more.", which fully demonstrates its skill in simplifying the use of JavaScriptDOM programming!Each teacher has
Window. alert: only one parameter. The warning box is displayed;No return value.Window. confirm: there is only one parameter. The prompt box is displayed.Press OK to return true; Press Cancel to return false.Window. prompt: parameter, which has
: Hidden matches all invisible elements. If the type attribute of the input element is "hidden", it will also be matched
Matches all elements that are hidden, or input elements of type "hidden". Return Value
Array Example
Search for all invisible tr
This article describes a more common method to obtain the radio value.Copy codeThe Code is as follows:Like the checkbox, radio has the same name and multiple values. When obtaining the radio value, we cannot follow the common text box. value method,
1. BackgroundThe callback function in Javascript is familiar to everyone. The most obvious example is the callback function provided during Ajax requests,In fact, the event processing method (onclick, ondblclick, etc.) of DOM nodes is also a
1. If an html Tag is set to $ (id) or getElementById, you must add the id attribute to the tag. IE and FF are compatible. For example, $ (mobile): If the input of mobile does not have the id attribute, the variable undefined will be reported in FF;2.
It is gratifying to note that there are many methods to obtain nodes using JavaScript. Here we will summarize the following methods (the test passes in IE7 and Firefox2.0.0.11 ):1. obtain from the top-level document node:(1) document. getElementById
Concat ()-combines two or more characters to return a new string.IndexOf ()-returns the index at the first part of a substring in a string. If no match exists,-1 is returned.CharAt ()-returns the character at the specified position.LastIndexOf
[Participating browsers: IE6/IE7/IE8/FF3.5/OP9.6/SF4/Chrome2][Operating system: Windows]This tutorial aims to achieve the separation of style and behavior in lightBox, reducing JS's work in various aspects (full screen masking, select masking in ie6,
In IE, when using checkbox or radio, you may find that sometimes the CheckBoxObject cannot be used. checked = true or CheckBoxObject. the setAttribute ('checked', true) method causes the checkbox or radio to be pre-selected.To solve this problem,
1. Use window. onerror to specify the error handling function. When an error occurs, onerror is called back. When multiple script errors exist in a JavaScript block, the script after the first error is triggered (callback) is automatically dropped
Of course, we can study the source code of the js library, or try to invent the wheel on our own. The process is quite interesting... now I will implement the drag-and-drop function of the page elements.Now let's start implementation. Let's start
For example:Copy codeThe Code is as follows:$ ('# Foo'). slideUp (300). delay (800). fadeIn (400); // The latency between. slideUp () and. fadeIn () is 800 milliseconds. Can hover design an extension? The answer is yes. The purpose of delayed
Demo address: http://demo.jb51.net/js/2011/hunt/index.htmLook downSee the letter "O" in the address bar! You use O to fire. Use the left and right arrows on the keyboard to move the letter O. When O moves to a, press the Space key to shoot! The game
Note:1.DeferredJQuery1.5 is a new feature. Many people translate it into "Asynchronous queue". I think it is reliable. After all, it has nothing to do with "latency, however, I still use the word deferred in this article.
2.This article mentioned in
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.