For a long time, I haven't seen such a good text that keeps lips and teeth fragrant. What I saw last time is:Douglas crockford's JavaScript, we hardly new ya (I translated it briefly, and the translation is later ).
It also teaches you how to use
For example, index. asp? Id = xxx & name = xxx
How can I use JavaScript to obtain the value of the ID name?
Method 1:
1
Script
>
2
Function
Getvalue (name)
3
{ 4 VaR Str = Window. Location. search; 5 If
Javascript Is Object-Oriented. However, many people do not fully understand this.
InJavascriptObjects are divided into two types. A common object is something we generally understand: numbers, dates, user-defined objects (such.
There is also a
. A simplified example
You only need to understand three keywords:The first one is function. The class definition in the JS world uses 'function'. The content in the function is the content of the constructor.The second is the this pointer,
Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--> Classes in JavaScript are represented by function functions, as follows: Function Student (){ // Define the field in student class and assign
The setTimeout and setinterval of JavaScript are two methods that can easily fool others' feelings, because we often think that the call will be executed in the established way. I think many people share the same feeling, for example
First, to make a game playable, you must combine Dynamic and Static resources. (Haha, everyone thinks I want to talk about itComposition... But what I want to talk about today is Javascript. Who will not do static things? Because things are
Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->
Inheritance is an essential feature of object-oriented systems, but in JavascriptThere is no inherited conceptual mechanism, but we can implement
Functions can use objects to remember the results of previous operations, so as to avoid unnecessary operations. Such optimization is called memory ). It is very convenient to optimize JavaScript objects and arrays.
Memoization is a method for
Line feed Based on WidthStyle = "word-break: Break-all"
Disable right-clickDocument. oncontextmenu = function () {return false ;}
Disable pasting
Enter to move the cursor to the next input box
Window Maximization
Maximize, minimize, and
Javascript can obtain resolution and various height widths. The results vary in Firefox, ie, and chrome browsers.
Conclusion: The Screen Resolution is reliable, with window. Screen. height + 'X' + window. Screen. width.
Only chrome knows how
Assume that we have such an operation procedure.
1.we have two pages, one showing the show.html page and one adding the information page add.html
2.when you click "add information" in show.html, the "add.html" page is displayed.
3.there is a
Getelementbyid getelementsbyname getelementsbytagname
Getelementbyid, getelementsbyname, getelementsbytagname
The last two are the collection, and the byid is only a single object.
Getelementbyid usage
For example:
Web taoba
Code
Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--> Ul > Li > 1111 / LI> Li > 2222 / LI> Li > 3333 / LI> / Ul> Script > VaR A =
1. Request. querystring ("parameter ")
// Obtain the specified parameter and return a string;
2. Request. querystrings ();
// Obtain all parameters and return an array;
3. Request. setquery ("parameter", "parameter value ");
// If this parameter
In ASP. net can have a timer, and it is not a javascript timer, but a server-side timer, because these timer in ASP. NET applications are rare, so we will not detail them in detail, just introduce basic applications.
ASP. NET
/*
-------------- Function retrieval --------------Trim function: trim () ltrim () rtrim ()Check whether the string is null: checkisnotempty (STR)Check whether the string is an integer: checkisinteger (STR)Minimum integer verification value:
BecauseArticleThere is a lot of content, so I won't write more here. Please come and check it with friends,Http://www.weiw.com/article/list.asp? Id = 339
Sort by letter:
ABSACOsActionAlertAlinkcolorAnchorAnchor (anchors
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