In development, there is often a need to directly close the page without any prompts. in IE6, you can simply write it like below.
Script Language
=
Javascript
>
Window. Opener
=
Null
Window. Close ()
Script
>
Javascript functions can be called with any number of parameters, regardless of the number of parameter names in the function definition. Because a function is of a loose type, it cannot declare the type of the expected parameter, and it is legal to
In the address bar, enter:
Javascript: Str = ''; for % 20 (var1 = 0; var1
View the source code of the new page.
To display the information:
Javascript: funcname = ''; for % 20 (var1 = 0; var1 '}; If (funcname! = '') {Document. write ('' + funcname
I. object scope
Function classa () {var v = "I Am a variable v"; this. V = "I'm property v"; var me = This; classa. prototype. F = function () {alert ("I Am a function for external access");} function _ F () {alert ("I am just an internal function,
The following describes how to use JavaScript to perform simple basic operations on the form:
Obtain the reference of a form.
You must obtain the reference of the form before programming the form. You can use the following methods to complete this
This blog is reproduced in: http://devbean.javaeye.com/blog/406265
Class is one of the core concepts of object-oriented programming. A class represents the abstraction of a class of things with similar attributes. Starting from this article, we will
People who know the data structure should have heard of the hash table data structure. It is a typical non-linear structure that uses key-value pairs to store and retrieve data, it is also called the hash or collection method. In a general linear
VaR mydate = new date (); mydate. getyear (); // obtain the current year (2 digits) mydate. getfullyear (); // obtain the complete year (4 digits, 1970 -????) Mydate. getmonth (); // obtain the current month (0-11, 0 represents January) mydate.
Original article: http://javascriptmvc.com/docs.html#&who=jQuery.Controller
Liu guixue, liuguixue@gmail.com)
The controller uses a proxy to organize event processing. If an event occurs in your application (user clicks or model instance
11. Enjoy the metadata of the Javascript design model ---- flyweight
Gof: Use the sharing technology to effectively support a large number of fine-grained objects.Concepts
Share mode: if multiple identical objects exist in a system, you can share
Today, I helped my colleagues solve a page problem and encountered a common public custom function trim (remove the leading and trailing spaces)
Function trim (STR) { var Re = // s * (/s [^/0] */s)/S */; re.exe C (STR); return Regexp. $1; } alert (
① Execute the script
Javascript statements that appear between are executed in the order they appear in the script. When a file has multiple scripts, the scripts are executed in the order they appear. The script can appear in or of an HTML
There are many ways to embed client JavaScript code into HTML documents:
① Placed between the tag pair .
② Place it in an external file specified by the src attribute marked by .
In XHTML, the content in the
Scripts in external files:
The
Regular expressions have a lot of content, but this series mainly discusses the most common knowledge points. We all have this experience in our study: if too many knowledge points are discussed each time, it will not be easy to absorb and digest,
7. Specify the matched position
As described earlier, multiple elements in a regular expression can match one character in a string. For example, \ s matches only a blank character. Some elements in the regular expression match the positions between
As we know, a method is a function called as an attribute of an object. When a function is called in this way, the object used to access the function becomes the value of the this keyword. Suppose you want to calculate the area of the rectangle
The typeof operator returns the string "function" when used in a function, but the function is indeed a special type of JavaScript Object. Since functions are also objects, they should have attributes.
Attribute length
As we know, in the function
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.