Just as we can write in this form:Copy codeThe Code is as follows:Function Hello (){Alert ("Hello ");}Hello ();Var Hello = function (){Alert ("Hello ");}Hello (); They are all the same.However, when we modify the functions, we will find a strange
Iframe has recently been used in several projects. Sometimes there are multiple iframe in a page, and several iframe need to access each other's functions or parent window functions. Today, I will organize the page framework programming.All frames
Plug-ins (of course not known as plug-ins) Instructions for use:1. Load files Copy codeThe Code is as follows: Compile html: Copy codeThe Code is as follows: Shadow | No Shadow OK!Parameter description:Shadow/* attribute name */= '3px/* position of
1. Code for adding IE browser to favorites Window. external. addFavorite (sURL, sTitle );Parameters:SURL: the address of the complete website page added to favoritesSTitle: name of the page title added to the favorites folder.Example: Add to
When I used JSMin.Over time, I found it too troublesome! Since we are programmers, why not make things easier?Therefore, I started to "friendly" JSMin.In the process of "friendliness", I encountered unexpected problems. I will immediately discuss
2D-Position allows you to move an absolute position object by dragging it.AbsolutePosition: Set the position attribute of the element to "absolute" (absolute ).Set BackColor or obtain the background color of the selected area.BlockDirLTR is not
In this way, the buyer only needs to drag the item he or she is interested in to his or her own shopping cart. He or she can also delete the item from the shopping cart and update the overall price and quantity of the shopping cart.Let's start with
The following is a minimization method implemented by recreating its minimize function:HTML:Copy codeThe Code is as follows: restore JS:Copy codeThe Code is as follows:Function openWin (){If (! Win){Win = new Ext. Window ({Title: "pop-up window
Http://github.com/alexyoung/riotjsExample:Ruby codeCopy codeThe Code is as follows:Context "a new user" doSetup {User. new}Asserts ("that it is not yet created") {topic. new_record? }EndContext "a new user" doSetup {User. new}Asserts ("that it is
I wrote a very simple jquery plug-in, which can be implemented by calling the functions on the page.Plug-in source code (listtolist. js ):Copy codeThe Code is as follows:/**Fromid: id of the source list.Toid: id of the target list.MoveOrAppend
When the page content of IE6 exceeds the window size, scrollWidth, clientWidth, and offsetWidth are all interpreted as the actual width of the content.The document. the body property does not return the expected results for us. For example, we use
SetTimeout (expression, latency)SetTimeout (expression, interaction time)The latency/interaction time is in the unit of haoss (1000 ms = 1 s). When setTimeout is executed, it is executed once after the specified delay time after loading, and only
Js mouse drag object:Copy codeThe Code is as follows:// Define the mouse drag objectDrag = function (a, o ){Var d = document; if (! A) a = window. event;If (! A. pageX) a. pageX = a. clientX;If (! A. pageY) a. pageY = a. clientY;Var x = a. pageX, y =
The XMLHttpRequest object is divided into four parts:1. Create an XMLHttpRequest component2. Set the callback function3. initialize XMLHttpRequest Construction4. Send a requestInstance code:Copy codeThe Code is as follows:Var userName;Var
1.1 omittedVersion 1.2. Omitted1.3 javascript and browser1.4 javascript FunctionsFrom 3 CschoolWhat can JavaScript do?JavaScript provides HTML designers with a programming tool.HTML creators are often not programmers, but JavaScript is a scripting
You can use the get method to obtain DOM elements after jQuery $ is called, as shown below:Copy codeThe Code is as follows:// Method 1$ ('Div '). get (1); // obtain the second div on the page Of course, you can also use the array index method to
1. Obtain the selected select value and text. The html code is as follows:Copy codeThe Code is as follows: one two three You can use the following script code s to obtain the selected value and textCopy codeThe Code is as follows:$ ("# MySelect").
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.