Users ' Guide
Compiled by Solaris_navi on APR. 2008 Engine version:0.97 Document version:0.97_modify_1 Abstract
The goal of this guide be to introduce the "use" this JavaScript Engine Beta Version for
Tsinghua University published the "
The first chapter of JavaScript introduction
1. Enter a JavaScript statement in the address bar
Javascript:Document.write ("Show text")
2. Embed JavaScript in an HTML document
Chapter II using Variables and
Chrome's own development tool monitors the financial HTTP information and obtains the following methods for obtaining stock data. To Wuliangye as an example, to obtain the latest market, access to data
Usually when we create a script tag on our page, either SRC introduces the external JS file:
?
1
Either write the content directly in the label:
?
1
2
3
The script tag has an
The code is as follows
Copy Code
Defining arraysAn array object is used to store a series of values in a separate variable name. We use the keyword new to create an array object. The following code defines an array object named
The code is as follows
Copy Code
function Mybrowser () {var useragent = navigator.useragent; Gets the useragent string for the browservar Isopera = Useragent.indexof ("Opera") >-1; Judge whether Opera browservar Isie =
The code is as follows
Copy Code
The JavaScript processing checkbox is summarized as follows
1,javascript checked checkbox form(1) Get the Form object(2) Set the checked value of the Form object, true to tick the check or
JavaScript feature detection is not browser detectionDetailed source reference:. net/article/21834.htm ">http://www.111cn.net/article/21834.htmAt first, the front-end engineers objected to browser testing, which they thought was bad because it was
Name spaceJavaScript itself does not provide a namespace mechanism, so in order to avoid the pollution of global space by different functions, objects, and variable names, it is common practice to create a unique global object for your application
6, the Prototype.js writing class way
Copy Code code as follows:
Code in the Prototype.js
var Class = {
Create:function () {
return function () {
This.initialize.apply (this, arguments);
}
}
}
After simplifying the
As we all know, advanced browsers can use the Json.parse () API to parse a JSON string into JSON data, slightly defective, and we can use the eval () function.
var str = ' {' name ': ' Hanzichi ', ' age ': ';
var obj = eval (' (' + str + ') '
You are welcome to continue to learn the JavaScript Advanced tutorial. Before that we had learned the JavaScript beginner tutorial. In this stage of study we will continue to study in the last tutorial has not had time to talk about the problem. I
From the beginning, the arrows are part of the JavaScript, and in the first JavaScript it is recommended that you wrap the inline script code in an HTML annotation, which prevents browsers that do not support JavaScript from incorrectly dropping
today saw a very good JavaScript FAQ on the web, trying to translate some content and share it with friends for fear that they would not be able to read it all the time. FAQ Original Address:
Need to use identity card verification work, but also to support the examination of 15-bit and 18-bit.
I temporarily lazy, ask colleagues have no ready-made functions available, colleagues Google a bit, throw me a asp-vbscript version of the
Copy Code code as follows:
var beatles = ["John", "Paul", "George", "Ringo"];
The Beatles array above is a typical example of a traditional array: the subscript for each element is a number, and the number increases by 1 for each
The usual array is populated with an implicit or display of the specified array subscript, but the array in JS can be assigned the element in the form of a name, which forms an associative array, such as:
Copy Code code as follows:
What is cross-domain
JavaScript is not allowed to call objects on other pages across domains for security reasons. But it also brings a lot of trouble to injecting IFRAME or AJAX applications at the same time as security restrictions. Here's a
Examples of how JavaScript defines global objects and javascript examples
This example describes how JavaScript defines global objects. We will share this with you for your reference. The details are as follows:
!function (factory) { factory(window[
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