In general, & | is relatively simple. We will not discuss it here.Prepare two objects for the following discussion.Copy codeThe Code is as follows:Var alice = {Name: "alice ",ToString: function (){Return this. name;}}Var smith = {Name: "smith
This is an article I saw in my blog last time. After testing, it is indeed more effective than jquery's $ (document ). ready (function (){....}) faster, and there is no problem with mainstream browsers such as ie and Firefox,I forgot who the
1. Differences between event streams IE uses bubble events Netscape uses capture events DOM uses capture first and then bubble eventsExample:Copy codeThe Code is as follows: click here Bubble event model: button-> div-> body (IE event
Let's take a look at the usage.Demo address http://demo.jb51.net/js/jCutter_jquery/demo.htmWrite in the HTML file as follows:Copy codeThe Code is as follows:This is the content of the opened page. You need to write the code as follows:Copy codeThe
1. compatible with firefox's outerHTML and FF, there is no outerHtml method.Copy codeThe Code is as follows:If (window. HTMLElement ){HTMLElement. prototype. _ defineSetter _ ("outerHTML", function (sHTML ){Var r = this. ownerDocument. createRange ()
However, I still have some experience in JS debugging:First, when we write a piece of JS Code:1. Click IE browser-toolbar-click developer tools or press F12Our debugging InterfaceClick the leftmost part to set a breakpoint like VS2005.
Click Debug:
When Using Ajax to submit information, I may often need to assemble some large strings to complete POST submission through XmlHttp. Although the process of submitting such large information does not seem elegant, sometimes we may have to face such a
Main function code:Copy codeThe Code is as follows:Function Chinese (num){If (! /^ \ D * (\. \ d *)? $/. Test (num )){Alert ("You did not enter a number. Please try again! ");Return false;}Var AA = new Array ("zero", "one", "two", "three", "Si", "Wu"
The Code is as follows:First, the js object LoadingMsg that implements this function:Copy codeThe Code is as follows:Var Class = {Create: function (){Return function () {this. init. apply (this, arguments );}}}Var LoadingMsg = Class. create
Array. prototype. slice. call (thisArg [, arg1 [, arg2 [,...])Member introduction:
ArrayArray object
Prototype[Property]Is the property of an object in javascript. It is used to return the prototype reference of the object. You can dynamically add
Selects 2-level linkage 3-level linkage 4-level linkage 5-level linkage [Ctrl + A select all Note: If you need to introduce external Js, You need to refresh it to execute]
You may often encounter this problem as follows:1. Create dom elements2. dom element insertion3. dom element replacement4. Delete dom elementsFirst, there are some simple dom elements on the page. aaaaaaaa bbbbbbbbbb ccccccccc Next we will create
In some transfer pages, GB2312 is used, and UTF8 is used on the receiving page. In this way, the received parameters may be different from the original ones. The URL encoded using the urlEncode function on the server is different from the URL
Go to the topic and talk about the timer first. There are two dedicated timer functions in javascrui:1. Countdown timer: timename = setTimeout ("function ();", delaytime );2. Cyclic Timer: timename = setInterval ("function ();", delaytime );The
When calling the offsetParent attribute of Element A, the element must be returned according to the following algorithm.If any of the following conditions is true, null is returned and the algorithm is stopped.A is the root element.A is the body
1. Choose Help> Software Updates> Find and Install...> Search for new features to install-> New remote site...Name: "Spket", Url: "http://www.spket.com/update/" Download complete restart Eclipse2. Window-> Preferences-> Spket-> JavaScript Profiles->
Knowledge learned from this:Document. getelementbyid ("ddhdh"). innerHTML can obtain all the data in the div, including tags... But it is only used in IE and OPERA.Document. getelementbyid ("ddhdh"). innerTEXT can be used to obtain text data in the
1. First, the effect is as follows:
2. UsageCopy codeThe Code is as follows:Var loader = new Ajaxloader (this. _ ContentID, {Text: 'loading... ', Top: 50 });Loader. Show (); 3. Code List:Copy codeThe Code is as follows:/*Processing progress bar,
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