Effect of webpage title Conversion Implemented by javascript (commonly used for webpage game advertisements)

Core code:Copy codeThe Code is as follows:DEMO code: title change effect code: Home of the script www.jb51.net Home of the script test, title change effect code. [Ctrl + A select all Note: If you need to introduce external Js, You need to

Basic javascript Architecture Based on jQuery

JQuery's use began to become the primary choice for javascript developers. However, without an overall plan, simple adoption will inevitably increase the maintenance cost in the future. A large number of jQuery plug-ins are like a double-edged sword,

JQuery live Function

From jQuery 1.4.1 Chinese reference: Event Delegate . The live () method is effective for an element that has not been added to the DOM because event delegation is used: event Handlers bound to the ancestor element can respond to events triggered

Simple implementation code of Javascript dynamic binding event

Below is the dom structure of the pageCopy codeThe Code is as follows: One Two Three Four Below is the javascript codeCopy codeThe Code is as follows:// Obtain the object by IDFunction id (v) {return document. getElementById (v );}// Obtain

Description and example of the value type and reference type summary in js

1. Embrace JavaScriptOnce well-known JavaScript has doubled its value with the popularity of AJAX. Now JavaScript is no longer just a dispensable auxiliary tool in WEB development, but it even has its own position as a "JavaScript engineer ", even

Javascript code for processing table tables

Copy codeThe Code is as follows:Var picarry = {};Var lnkarry = {};Var ttlarry = {};Function FixCode (str ){Return str. replace ("'", "= ");}Var t = document. getElementById ("pictable ");Var rl = t. rows. length;Var baseu = document. URL. replace (/(

Some precautions in javascript are being updated.

1. prototype: (1). Using prototype can greatly reduce the memory demand for each object, because the object can inherit many attributes.(2). Objects can inherit these attributes even if they are added to the prototype after the object is

Jquery mask control implementation code

Style code:Copy codeThe Code is as follows:# Div_maskContainer{Display: none;}/* Mask style */# Div_Mask {Z-index: 1000;Filter: alpha (opacity = 40 );Position: absolute;Left: 0px;Top: 0px;Background-color: # D4D0C8;}/* Display information style */#

Cross-origin Data Reading using Flash in Ajax

Cross-origin operations of Ajax have always been a problem. Currently, the main solutions include:1. JSONP (must be supported on the server)2. IFrame (operations can only be performed between subdomains)3. Page proxy (this is omnipotent)4.

Javascript static tree menu implementation code

If anyone is interested, they can change it to dynamic loading data, or use jquery, and the code will certainly be much less! I found that adding some css makes this tree useful on static pages! the definition list can also be changed to a tree:

Learning JavaScript from cainiao

Copy codeThe Code is as follows:Function tt (){Alert (11 );}Var B = tt;Var b1 = tt (); // execute the tt () function For function reference, you can directly assign the function name "tt" to the variable, but it cannot be in the form of function

Prototype Date object Learning

Let's take a look at the source code:Copy codeThe Code is as follows:Date. prototype. toJSON = function (){Return '"' + this. getUTCFullYear () + '-' +(This. getUTCMonth () + 1). toPaddedString (2) + '-' +This. getUTCDate (). toPaddedString (2) + 'T'

JQuery can drag the div to implement the corrected version of the script house.

Of course, the Code is also very convenient to use, so you don't have to worry about a lot of things.In the study, jQuery is used to drag a div, and the code is appended to the end of this article.For implementation ideas, refer to my DIV (2) that

Javascript prohibit webpage copying

1. Disable right-click and copyMethod 1:Add the following code to the webpage:Method 2: Add the following code to :OrIn essence, method 2 is the same as method 1.Method 3: If you only restrict replication, you can add the following code in :2.

Use firefo xml to read and write JavaScript code

Read xml files to strings Step 1: convert an xml file into a DOM Structure1Var xmlDoc = document. implementation. createDocument ("", "test", null );XmlDoc. load ("d: \ develop \ bookmarks. xml ");2Var req = new XMLHttpRequest ();Req. open ("GET",

Javascript string conversion unicode encoding function

Copy codeThe Code is as follows:Function uniencode (text){Text = escape (text. toString (). replace (/\ +/g, "% 2B ");Var matches = text. match (/(% ([0-9A-F] {2})/gi );If (matches){For (var matchid = 0; matchid {Var code = matches [matchid].

JQuery (1.3.2) 7 lines of code deal with the layer that follows the screen scrolling

Copy codeThe Code is as follows: jquery. text-effects 7 lines of code follow the screen scroll layer. Dev By CssRain.cn Test ie6 +, firefox3.0

Method for Determining whether script loading is complete

We can use onload to determine the loaded JS object (js. onload), this method is supported by Firefox2, Firefox3, Safari3.1 +, and Opera9.6 + browsers, but not IE6 or IE7. Curve saving-IE6 and IE7 we can use js. onreadystatechange is used to track

JQuery autocomplete plugin Modification

Two major changes are made:I. synchronization between upstream and downstream selections and input values.After you enter a keyword, the value of the keyword input box is not synchronized with the selected value when the drop-down option is

JavaScript reads and sets style attributes of document elements

First, let's talk about the style sheet attributes.1. inline style is set in the element style attribute, with the highest level2. The page style table definition is defined in the page , followed by the level3. External link style table

Total Pages: 5378 1 .... 4279 4280 4281 4282 4283 .... 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.