javascript:; with javascript:void (0) Introduction to use

Sometimes when we are writing JS, we need to trigger events without returning values, so we might need to write this.href= "#" contains a location information. The default anchor is #top, which is the top of the page, which causes the browser to

The original type of JavaScript

original value and reference valueIn ECMAScript, a variable can hold two types of values, that is, the original value and the reference value. The original value (primitive value) is a simple data field stored in the stack (stack), that is,

JavaScript Advanced Programming: Canvas Drawing

Canvas Draw Rectanglevar drawing = document.getElementById (' drawing '); if (Drawing.getcontext) {var context = Drawing.getcontext (' 2d ');// Draw Rectangle Context.fillstyle = ' #0000ff '; Context.fillrect (10, 10, 50, 50);//Draw Translucent red

In-depth understanding of javascript closures

An in-depth understanding of JS closures (closure) is a difficult and unique feature of the JavaScript language, and many advanced applications rely on closures.The scope of a variableTo understand closures, you must first understand the special

JavaScript Regular Expressions

A regular expression is a description of the structure of a string , which simply means the character arrangement of a string. It is a master in string matching and processing. The regular notation1. abbreviation :/pattern/[attributes]var reg

JavaScript DOM objects and jquery objects are converted to each other

1. Analysis of source codejavascript Dom object and jquery object convert HTML 2. Operation Result(1) initialization(2) Click the "JavaScript Dom object to convert to jquery object" button(3) Click " jquery objects converted to JavaScript DOM

JavaScript Advanced Programming: Chapter Tenth-DOM

1. What is DOM?The DOM (Document Object model) is an API (Application programming Interface) for HTML and XML documents. The DOM depicts a hierarchical tree of nodes that allows developers to add, remove, and modify portions of a page.2. Node

JavaScript Advanced Programming: Chapter Seventh-Functions

vi. function Expressions You can use anonymous functions when you use a function as a value RecursiveA recursive function is made up of a function that calls itself by name///using a function declaration to define a recursive function may be

JavaScript inheritance in detail (v)

In this chapter, we will analyze John Resig an implementation of JavaScript inheritance-simple JavaScript inheritance.John Resig is famous as the founder of jquery. Is the author of Pro JavaScript techniques, and Resig will launch a book "JavaScript

Javascript-Common regular function (for forgetting to see)

Test : Tests whether a string contains a matching result, contains a return of true, and does not contain a return of false. match: Regular match based on pattern, if matched to, returns match result, such as no match to return null Search : a

Why is it not recommended to use the Eval () function in JavaScript?

Eval CamouflageThe timeout function settimeout and setinterval both accept the string as the first argument, and the string is executed at the global scope because eval is not called directly.Security issuesEval also has a security issue because it

Javascript-object-oriented and prototype (3).

Advanced object-oriented and prototype--common tricksPrototype schema creation object also has its own shortcomings, it omits the constructor parameter initialization of the process, the disadvantage is that the initialized values are consistent.

JavaScript Object-oriented and prototype

/*Factory mode function CreateObject (name,age) {var obj = new Object ();//Create a new object obj.name=name;//the properties of the new object obj.age=age; Obj.run=function () {//New object method return this.name+ "," +this.age+ "... running.";}

JavaScript Regular Expressions

/*Review Var obj= new number (2), alert (number.min_value), var num = new Number (22E3), alert (num), alert (Isfinite (num));// Determine if the specified range is exceeded var person={fname: "John", lname: "Doe", Age:25};var txt= ""; for (x in

The firstchild,lastchild,nextsibling,previoussibling of Javascript--dom

element. FirstChild: Read-only property the first child nodeStandard: FirstChild will contain the text type of the nodeNon-standard: contains only ELEMENT nodeselement. Firstelementchild: Gets the child nodes of the first element type under the read-

JavaScript regular expression longest match (greedy match) and shortest match (lazy match)

Recently in reading Requirejs 2.1.15 source code, the source code at the beginning of the definition of a series of variables, there are 4 regular expressions:var commentregexp =/(\/\* ([\s\s]*?) \*\/| ([^:]|^) \/\/(. *) $)/mg,

Distinguish between type= "Text/javascript" and language= "JavaScript" in script

Content SummaryWhen making a Web page, it is often necessary to use the JS code that the client can run on the page, so you need to add a reference. JS reference generally have type= "Text/javascript" and language= "JavaScript" two ways, but

JavaScript in-depth understanding of JS closures

Closures (closure) are a difficult and unique feature of the JavaScript language, and many advanced applications rely on closures. the scope of a variableTo understand closures, you must first understand the special variable scope of JavaScript.The

Simply record the JavaScript advanced app

I am a. NET programmer but because of the company's needs, the development of offline apps, but in the process of working I found that people around the writing of JavaScript is the process-oriented coding, For my. NET programmer, this situation is

Cookie operations in JavaScript

Cookie operations in JavaScript This article describes how to operate cookies in JavaScript, this article describes what are cookies, basic Cookie knowledge, common Cookie problems, two methods for clearing cookies, basic Cookie usage, and advanced

Total Pages: 5379 1 .... 354 355 356 357 358 .... 5379 Go to: GO

Alibaba Cloud 10 Year Anniversary

With You, We are Shaping a Digital World, 2009-2019

Learn more >

Apsara Conference 2019

The Rise of Data Intelligence, September 25th - 27th, Hangzhou, China

Learn more >

Alibaba Cloud Free Trial

Learn and experience the power of Alibaba Cloud with a free trial worth $300-1200 USD

Learn more >

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.