Introduction to Javascript
Download
I am a resultionist. I only recognize the results and do not recognize the process. A single goal and a task can be completed by me, that is, coding, however, I don't have the need for expression, and I don't
To get started you will need to download the library JSInterface from the http://code.google.com/p/jsinterface/
Then, create a project and add (Properties-> ActionScript Build Path-> Library path-> Add SWC ...) the library to the project. it is
JavaScript advanced training-custom object
)
I. Overview
In Java, we can define our own classes and create objects based on these classes for use. In Javascript, we can also define our own classes, for example, define the User class and Hashtable
// Whether the format is currency ####
Function IsCurrencyData (s ){
Var reg =/^ \ d *\.? \ D {0, 2} $ /;
Var result = reg.exe c (s );
If (! Result)
Return false;
Return true;
}
// Precise data to the index of the decimal point
Function ToFixed
Document directory
What is cross-Origin
1. document. domain + iframe settings
2. dynamically create scripts
3. Use iframe and location. hash
4. Cross-Origin data transmission implemented by window. name
5. Use HTML5 postMessage
6. use flash
Document directory
Browser Mode
Text mode
Use IE8 Developer Tools to debug JavaScript scripts
Explorer 8 explorer Explorer
Is it over? Actually, it's just the beginning.
In the previous article IE8 "Developer Tools" Usage Details (menu
If multiple buttons on a page need to be added for event processing, the processing methods for these elements are similar. For example, there are 10 buttons, we can write an event processing function for each button, which is time-consuming and
During Web development, it is often used to obtain input characters during keyPress. String. fromCharCode () can be used to implement this function, but this function does not work when you use the Shift key to enter special characters. You need to
Based on the current management system of the academic affairs office of our school and the help of Javascript, we can easily calculate the score.
HTML for testing:
Style = "width: 100%; border-collapse: collapse;">Course Code Course name Course
Document directory
Scenario 1: No escape
Scenario 2: All escape
Browser version: JavaScript template language shootoffRun performance test
Test code in: https://github.com/fengmk2/mk2blog/tree/master/2011/4/js-template-benchmarks
$ node
Test javascript regex
Test regex:
Test regex flags:
('G', 'I', or 'M ')
Test string:
Select method:
ExecTestMatchSearchReplaceSplit
Dest regex:
Dest expression:
In this era where js frameworks run around, have you ever considered writing your own framework? The following content may be helpful.What should a framework contain?1. Language extensionMost existing frameworks provide this part of content.
Inheritance
Class inheritance
CopywritingFunction parent (){This. x = 10;}Function child (){Var parentObj = new parent ();For (var p in parentObj) this [p] = parentObj [p];}Var
As a semicolon party, I am not nagging myself. To make our discussion more valuable, I have extracted some materials to share with you.
JavaScript auto-increment rules, with three
When there is a line break (including multiple line comments
Use the ScriptManager object
# Region run client scripts
///
/// Run the client script
///
/// current page Object
/// client script
Public static void RunClientScript (Page page, string script, bool addScriptTag)
{
String key = Guid. NewGuid (
The following code works correctly in IE7, FF2.0, Opera9.21,
And Safari3.01, it fires the server event only when the user confirm to delete in
The browser.
The server control: Text = "Delete" CssClass = "linkbutton" OnClientClick = "javascript:
1. Ajax calls are blocked by anti-virus software/Firewall
I remember that I encountered this problem in my project in and found that the client turned off the kv300 and rising web page monitoring options to solve the problem, because it was a system
Introduction
Definition
Value of this in Global Code
Value of this in Function Code
Reference Type
Function call and non-reference type
The reference type and this are null.
Value of this in the function called as the constructor
Manually set this
Introduction
Definition
Executable code
Global Code
Function Code
Eval code
Conclusion
Other references
This article mainly discusses the ECMAScript execution context and related ECMAScript executable code.
Definition
Each time the controller is
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