HTML5 and CSS3 Face Test (2)

Source: Internet
Author: User

What is the difference between 10.xhtml and HTML?

Html is the language of Web page design, and xhtml is an XML -based labeling language

11. Object-oriented reference methods are divided into several types?

It 's written internally. The prototype chain refers to the

12. What is an overload?

The function names are the same, but the parameters are different, so different methods are called, andJavaScript does not support overloading, but you can use arguments to simulate overloading.

tell me about the arguments object?

Arguments is a special object that can be seen as an array, because its acquisition is obtained by subscript.

You can use arguments.length to determine how many incoming parameters to call the function, to achieve the overloaded effect

What is the difference between 14.call and apply?

Same: Invokes the method of an object, replacing the current object with another object

difference : The Apply method must be a valid array or a arguments object.

Instance:

Function Cat(name){animal.call(this,name )} takes the animal object instead of this(cat ) Object So Cat will have the Animal the method

Animal.type.call (Cat, ",") puts the Animal type method into the cat

Animal.type.apply (cat,[]) puts the type method of Animal into the cat The second parameter must be an array or a arguments object

Animal.type.apply (This,arguments)

15. How to Inherit?

1Call and apply

2prototype(enables an instance to acquire a method by adding an attribute to the prototype of the constructor)

3extend([Deep],target,obj,[obj] .... ) ( Deep ) is a Boolean value Target is the new object returned obj ... is the object to be introduced

16. What is the difference between a deep copy and a shallow copy?

Deep copy: Copy the basic class of the object, while copying the object in the original object, completely new object, the two sides will not interfere

Shallow copy: Copies only the object's base type, object type, but still belongs to the original reference

17. What are the two major types of variables?

1 base class:numberstring Undefind null Boolean

2 Reference classes: Array Object functions

What is the difference between 18.writeln and write?

Both write and write are output statements, but after the write output, the cursor wraps to the next line

Example:document. Write(content)

19. browser's kernel?

IE WebKit(chrome) Gecko(Firefox) Blink (by Google and Opera creation)

20.IEbug problem?

1 floating elements with margin consistent direction the first element will be a bilateral distance, adding the display to the first element Inline

2 Z-index Invalid add position to parent :relative

3 Minimum height of IE 19px,!important

4 floating elements at the same level as absolutely positioned elements, locating elements disappear, not at the same level

tell me about reset 's understanding.

is an initialization of the form element, using the id.reset ()

22. What is a clear float?

The inner element is detached from the document stream because it floats, so that the parent element cannot be automatically adjusted so the float

Method:

1 Add a div to the inner element tail plus a style clear:both(more waste tags)

2 Add height to parent (no extensibility)

3 Add overflow to parent :hidden(cannot be used with location, beyond hidden)

23. List the method of type conversion?

forced type conversions: Number () String () Boolean ()

Implicit type conversions:= = = = = = +

What is the difference between 24.Concat and push?

Same: Adds an element to the last face of the array

different: If an array is added,push will store the array as a value and concat will take the array apart and store it in one

An explanation of the incident?

If there is more than one add event, then if the element is added or deleted, the added element will not have an event handler, so the event is delegated to the parent

usage: Parent .

HTML5 and CSS3 Face Test (2)

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.