Common front-end development topics that may be useful to you

Source: Internet
Author: User

1. Understanding and knowledge of Web standards and website

Tag closure, label lowercase, no nesting, improve search robot search probability, use of external chain CSS and JS scripts, structure behavior of the separation, file download and page speed, content can be accessed by more users, content can be accessed by a wider range of devices, less code and components, easy maintenance, revision convenience, No need to change the content of the page, provide a print version without the need to copy content, improve the usability of the site;

What is the difference between 2.xhtml and HTML?

HTML is a basic Web page design language, XHTML is an XML-based labeling language
The most important differences are:
XHTML elements must be nested correctly.
XHTML elements must be closed.
The label name must be in lowercase letters.
The XHTML document must have a root element.

3.Doctype. Strict and promiscuous modes-how do you trigger these two patterns to differentiate between them ?

Used to declare documents using that specification (html/xhtml) is generally strictly over-frame-based HTML documents
Adding an XML declaration can be triggered and resolved to a bug that IE5.5 has IE5.5

4. What are the inline elements? What are the block-level elements? CSS box model?

Block-level elements: div p H1 H2 H3 h4 form UL
Inline elements: A b br i span input Select
CSS box model: Content, Border, margin,padding

What are the ways 5.CSS is introduced? What is the difference between link and @import?

Inline embedded outer chain import
Difference: Loading at the same time
The former does not have compatibility, the latter CSS2.1 the following browsers do not support
Link supports the use of JavaScript to change styles, which cannot be

What are the 6.CSS selectors? What attributes can be inherited? How is the priority algorithm calculated? Inline and important which priority is high?

Tag Selector class Selector ID Selector
Inheritance is better than specifying id>class> tag selection
The latter has a high priority

7. What are the three layers of the front-end page, and what are the roles?

Structure Layer Html Presentation layer CSS behavior Layer JS

What is the basic statement composition of 8.CSS?

Selector {Attribute 1: value 1; Property 2: Value 2; ...}

9. What are the browsers that you have made? What are the cores of the browser?

IE (ie kernel) firefox (Gecko) Google (WebKit) opear (Presto)

10. How to solve several IE6 bugs

    1. Double-sided error float caused by the use of display

    2. Pixel problem using float caused by use of dislpay:inline-3px

    3. Hyperlinks hover Use the correct writing order after clicking Fail link visited hover active

    4. Ie z-index problem add position:relative to Parent

    5. Png Transparent use JS code to change

    6. Min-height min Height! Important Solution '

    7. Select to cover IE6 using IFRAME nesting

    8. Why is there no way to define a width container around 1px (IE6 default row height caused by using over:hidden,zoom:0.08 line-height:1px)

11. What is the difference between the title and ALT attribute on the label?

Alt when the picture is not displayed is represented by the text.
Title provides information for this property

12. Describes the role and purpose of CSS reset.

Reset the browser's CSS default properties browser for different symbols, different styles, and then reset them to unify

13. Explain CSS sprites, how to use it.

The CSS Wizard consolidates a bunch of small images onto a large picture, reducing the number of requests to the server for pictures

14. What is the difference between browser standard mode and weird mode?

Different rendering modes for box models
Use Window.top.document.compatMode to show why the pattern

15. How do you optimize your website's files and resources? The expected solutions include:

File merge
File minimization/File compression
Using CDN Hosting
Use of the cache

16. What is semantic HTML?

Intuitive recognition tags are good for search engine crawling

17. Several ways to clear the float, the advantages and disadvantages of each

    1. Use empty tags to clear floating clear:both (theoretically clear any label,, add meaningless labels)

    2. Use Overflow:auto (empty tag element to clear floating and have to increase the abuse of unintentional code, using zoom:1 for IE compatibility)

    3. is to clear the float with the Afert pseudo-element (for non-IE browsers)

JavaScript pen Questions


What data types are returned by the typeof of 1.javascript
Object number Function Boolean Underfind

2. Examples of 3 coercion type conversions and 2 implicit type conversions?
Force (Parseint,parsefloat,number)
Implicit (==–===)

3.split () The difference between join ()
The former is the form of an array of cuts, the latter is the conversion of arrays into strings

4. Array method Pop () push () unshift () Shift ()
Push () trailing add pop () trailing delete
Unshift () header add Shift () header Delete

5. What is the difference between event bindings and ordinary events?

The difference between 6.IE and DOM event streams
1. The order of execution is different,
2. Different parameters
3. Event not added on
4.this pointing problem

The difference between the Get and post modes when 7.ajax requests
One in the back of the URL and placed inside the virtual carrier
There is a size limit
Security issues
Application of a different one is the forum and so on only need to request, one is similar to change the password 8.call and apply the difference
Object.call (THIS,OBJ1,OBJ2,OBJ3)
Object.apply (this,arguments)

What is the compatibility of 9.IE and standard?
Var ev = EV | | Window.event
Document.documentElement.clientWidth | | Document.body.clientWidth
Var target = ev.srcelement| | Ev.target

How to interpret JSON data when 10.ajax requests
Use the Eval parse in view of security considerations using parse more reliable

11.b method of inheriting a

12. Write a function that gets a non-inline style

function GetStyle (obj,attr,value)
{
if (!value)
{
if (Obj.currentstyle)
{
Return Obj.currentstyle (attr)
}
Else
{
Obj.getcomputedstyle (Attr,false)
}
}
Else
{
Obj.style[attr]=value
}
}

13. What is the event delegate?
Let's take advantage of the event bubbling principle, let your own trigger event, let his parent element instead of execution!

14. What are closures, what are the features, and what are the effects on the page?
Closures are functions that can read other functions ' internal variables.

15. How to block event bubbling and default events
Cancebubble return False

16. Add Delete to replace the method inserted into a contact
Obj.appendchidl ()
Obj.innersetbefore
Obj.replacechild
Obj.removechild

17. Explain the principles of JSONP, and why not the real Ajax
Dynamically create a script tag, callback function
Ajax is a page no refresh request data operation

(It Hot industry)

18.javascript local objects, built-in objects and host objects
The local object is an array of obj regexp, etc. that can be instantiated with new
The built-in objects are gload Math, etc. that cannot be instantiated.
The host is the browser's own Document,window, etc.

The difference between 19.document load and document ready
Document.onload is executed after the structure and style are loaded. js
Document.ready native species there is no such method, there is $ () in jquery. Ready (function)

20. The difference between "= =" and "= = ="
The former will automatically convert the type
The latter will not

Same-origin strategy for 21.javascript
A script can read only the properties of windows and documents from the same source, where the same source refers to a combination of host name, protocol, and port number

22. Write an array-to-weight method
function Osort (arr)
{
var result ={};
var newarr=[];
for (Var i=0;i<arr.length;i++)
{
if (!result[arr])
{
Newarr.push (arr)
Result[arr]=1
}
}
Return NEWARR
}

Common front-end development topics that may be useful to you

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.