JavaScript face question (vi)

Source: Internet
Author: User
Tags object model javascript array

First, single choice

1. Which of the following statements produces a run error: (a)

A.var obj = ();//Syntax error
B.var obj = [];//Create array
C.var obj = {};//Create object
D.var obj =//;
Reason: var obj = new Array (); Is right; the curly braces in JavaScript represent the creation of the object. var obj = {id:1, name: "Jacky"};alert (Obj.name), the previous example creates an object with the property ID (value 1), and the property name (value Jacky). Attribute names can be quoted as "id", "name", or not cited.
Of course, in addition to attributes, you can create methods.

2. Which of the following words does not belong to JavaScript reserved words: (b)

A.with
B.parent
C.class
D.void
The following reserved words cannot be used as variables, function names, object names, etc., and some of the reserved words are for future JavaScript extensions.

·Abstract

· Boolean

· Break

· byte

· Case

· Catch

· Char

· class

· Const

· Continue

· default

· Do

· Double

· Else

·extends

· false

· Final

· finally

· float

· for

· function

· Goto

· if

· Implements

· Import

· inch

· instanceof

·int

· Interface

· Long

· native

· New

· NULL

· Package

· Private

· protected

· Public

· return

· Short

· Static

·Super

· Switch

· synchronized

· This

· Throw

· throws

· transient

· true

· Try

· var

· void

· while

· with

(2) function F1 () {
}
1. Alert (F1 instanceof Function);//true
2. Alert (F1 instanceof Object);//true
3. Alert (Function instanceof Object);//true
4. Alert (Object instanceof Function);//true
function is an instance of object, and object is an instance of function.
Functions are constructors, and object is also a function.
Object.prototype is the culmination of all the prototype chains, instanceof will find the entire prototype chain

4. Please choose to understand JavaScript incorrectly: (ABCD)
A.jscript is the abbreviation for JavaScript
B.javascript is a Java scripting language developed by Netscape, which is designed to simplify the development of Java
The main reason for the large number of compatibility issues with C.firefox and IE is that their support for JavaScript differs
D.ajax technology must use JavaScript technology

5, Foo object has the att attribute, then gets the value of the Att property, which of the following practices is possible: ()

A.foo.att
B.foo ("Att")
C.foo["ATT"]
D.foo{"Att"}
E.foo["a" + "T" + "T"]

5, Foo object has the att attribute, then gets the value of the Att property, which of the following practices is possible: ()

A.foo.att
B.foo ("Att")
C.foo["ATT"]
D.foo{"Att"}
E.foo["a" + "T" + "T"]

6. What kinds of HTML tags can enter text manually without specifying special attributes: (ACE)
A.<textarea></textarea>
B.<input type= "Text"/>
C.<input type= "hidden"/>
D.<div></div>

7. What are the global functions of javascript: (ABC)
A.escape
B.parsefloat
C.eval
D.settimeout
E.alert

8, about the IFRAME statement is correct: (ABCD)

A. Through an IFRAME, a Web page can embed other Web content and can dynamically change
B. Under the same domain name, the embedded IFRAME can get the object of the outer page
C. Under the same domain name, the outer page script can get objects within the IFRAME Web page
D. The size of the IFRAME can be adjusted by script

9. The correct statement of the form is: (ABCDE)
A. The table can contain TBODY elements
B. The table can contain caption elements
C. Tables can contain multiple tbody elements
D. The table can contain colgroup elements
E. The table can contain COL elements

10. The window object of IE is stated correctly: (ACD)
The A.window.opener property itself is a pointer to the Window object
The B.window.reload () method can be used to refresh the current page
The role of c.window.location= "a.html" and window.location.href= "a.html" is to replace the current page with a a.html page
D. Defines the global variable G; You can access the variable in a WINDOW.G way

Iii. Questions and answers:
1, talk about the use of the JavaScript array sorting method sort (), highlighting the use of the sort () parameter and its internal mechanism
The sort implementation features a Java-like comparer that sorts data from the first dimension of a multidimensional array
You can define your own sorting methods, very few functions
2. Briefly describe the difference between a DIV element and a SPAN element.
Div has a carriage return, span no
3, combined with text this paragraph structure, talk about the difference between innerHTML outerhtml innertext.
It's just a matter of writing and seeing clearly.
The html,outerhtml inside the innerHTML object includes the object and the inside
Text inside the InnerText object
4, say a few XHTML specification content (at least 3)
Attribute quoted, cannot have mismatched tags, add definition
5, to the Web standardization (or site reconstruction) know what the relevant knowledge, briefly describe a few of the Web standards you know?
The Web page consists mainly of three parts: structure (Structure), Performance (Presentation) and Behavior (Behavior). The corresponding website standard also has three aspects: the structured standard language, mainly includes XHTML and XML, the performance standard language mainly includes the CSS, the behavior standard mainly includes the object model (such as the web-site DOM), the ECMAScript and so on.

Data from: http://www.jb51.net/article/23127.htm

JavaScript face question (vi)

Related Article

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.