Javascript scaling Nav

When learning javascript, I made a javascript Application: Scaling navigation.Key knowledge points: Get the elements of the trigger event handle, such as . When an onclick event is triggered, obtain the elements of the event, the 'target' attribute

Details about this in js

This is a keyword in Javascript. It indicates an internal object automatically generated during function running and can only be used within the function. For example, Function test (){ This. x = 1; } The value of this varies with the function usage.

Examples of using html5 Custom data-* attributes and jquery's data () method

People always like to add custom attributes to HTML tags to store and operate on data. However, you do not know whether other scripts will reset your custom attributes in the future. In addition, if you do this, the html syntax does not conform to

Example of JS image size detection

Copy codeThe Code is as follows:

Jquery uses ajax to call backend method instances

Copy codeThe Code is as follows:Syntax:$ (Function (){Var callback = function (r) {// r indicates the data returned by the background data.}$. Get ("", callback); // path of the write method in quotation marks});In this way, the data obtained by the

Process and traverse DOM element attributes and methods of XML documents

Used to process DOM element attributes of XML documentsCopy codeThe Code is as follows:ChildNodes: returns an array of all child elements of the current element;FirstChild: returns the first sub-element of the current element;LastChild: returns the

Example of using Javascript to obtain the parameter transfer value of HTML static pages

Let's take a look at my code. Just embed the code into a page file.Example 1 Use regular expressions to obtainCopy codeThe Code is as follows:Var LocString = string(registry.doc ument. location. href );Function getQueryStr (str ){Var rs = new RegExp

The specific instance code of the pop-up layer is called multiple times on the same page in javascript.

Copy codeThe Code is as follows: click the text pop-up layer 1111111111111111111111111222222222222222222222222222222222222222222222222222 mobile phone number: 1. There is a delay when the network is busy. Please do not send it multiple times

Example code of the button dimmed after the js form is submitted

Copy codeThe Code is as follows: the button becomes grayed out after the form is submitted and --> javascript :{ this. disabled = true; document. form1.submit ();} ">

Nine local objects of Reading Notes in JavaScript advanced programming Array

Create an Array objectCopy codeThe Code is as follows:// OneVar aValues = new Array ();// TwoVar aValues = new Array (20 );// ThreeVar aColors = new Array ();AColors [0] = "red ";AColors [1] = "green ";AColors [2] = "blue ";// FourVar aColors = new

Total Pages: 5378 1 .... 5374 5375 5376 5377 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.