Millet 2019 end engineers face questions and answers to resolve

First, multiple choice (a total of 24 items, each of 5 points)

1. With regard to XSS statement, the error is

A、script,js,vbscript,flash

B, Category: reflection, storage

C, is the browser code injection, malicious script, css, html code is parsed by the browser

D, PHP-related vulnerabilities

Reference answer: D

Answer Analysis: browser-side code injection, malicious script, css, html code is parsed by the browser. Classification: reflection storing script, js, vbscript, flash

 

2. With regard to the use of JSONP is wrong to say:

A, cross-domain communication can be realized

B, based on json format data compatibility, ease of use

C, only supports cross-domain HTTP requests such cases, the problem can not be solved JavaScript calls between two pages of different domains

D, can be the perfect support POST requests

Reference answer: D

3.HTML page has the following structure of the code, the following options jQuery code shown, can not let the Chinese character "four" is the color turns red?

 

 

A、  $("#header ul li:eq(3)").css("color","red");

B、  $("#header li:eq(3)").css("color","red");

C、  $("#header li:last").css("color","red");

D、  $("#header li:gt(3)").css("color","red");

Reference answer: D

Answer Analysis:

Note that selection can not

(Join the group 677 079 770 for more answers to interview questions and learning materials.)

 

4. Which of the following belong to the "creational" design pattern?

A、Façade

B、Singleton

C、Bridge

D、Composite

E, not above

Answers: B

Answer Analysis:

Overall, the design patterns into three categories:

Create a schema, a total of five categories: factory method pattern, abstract factory pattern, singleton, the builder pattern, prototype model.

Structural model, a total of seven kinds: adapter mode, decorative mode, proxy mode, the appearance mode, bridge mode, combination mode, Flyweight.

Behavioral patterns, a total of eleven kinds: Strategy pattern, the template method pattern, observer mode, iterator pattern, the responsibility chain mode, command mode, the memo mode state mode, the visitor pattern, intermediary model to explain the mode.

 

The most common site home page file name is ().

A、index.html    

B、homepage.html   

C、resource.html

D、mainfrm.html

Answers: A

Answer Analysis: The most common site home page file name is index.html, followed default.html.

(Join the group 677 079 770 for more answers to interview questions and learning materials.)

 

6.sessionStorage method to save the data is correct:

A, sessionStorage.setItem ( "key", "key name");

B, sessionStorage.saveItem ( "name key", "key");

C, sessionStorage.saveItem ( "key", "key name");

D, sessionStorage.setItem ( "key name", "key");

Reference answer: D

Answer Analysis: as long as you remember two things, set up at the beginning usually with set, get adopted at the beginning get; for key words, usually (key, value) of the form; so choose D

 

7. Use CSS style selector associated with a statement, the contents of the following HTML elements may be red font is: ()

A, <div> contents </ div>

B、<div><em><span>内容</span><em></div>

C、<span></div>内容</div></span>

D, above all OK

Answers: B

Answer Analysis: No

 

Use 8.JavaScript error code is described in ()

A, JavaScript widely used in creating web pages

B, JavaScript is a powerful weakly typed language

C, JavaScript is a scripting language, so it is generally no one with

D, avaScript is an interpreted scripting language

Reference answer: C

Answer Analysis: slightly.

 

9. The following figure shows (44) design pattern, belonging to the (45) design pattern for (46).

When the overall hierarchy - A, represents the portion of the object 

B, the other must be notified when a target object, and other objects who can not assume it is 

C, when the objects to create complex algorithms should be independent of the object and the fitting part of the way when 

D, the general need to compare the complex object pointers and pointers instead of a simple

Answers: A

Answer Analysis:

This title examines knowledge of object-oriented design patterns. Design patterns are set to be used repeatedly, through code design experience cataloging summary. Use design patterns to reuse successful design and architecture, reuse the same solutions to similar problems, to ensure the reliability of the code, the code is compiled real engineering, able to adapt to changes in demand. A total of 23 design patterns.

A combination of (Composite) mode. Combining objects in a tree structure to represent "part - whole" hierarchy. It allows customers to use a single consistent objects and composite objects.

Design patterns have the following classification:

1. Create a schema. To create an object of a separate study, it is possible to create objects efficiently. 6 Create schema: simple factory pattern (SimpleFactory), factory method model (FactoryMethod), Abstract Factory (AbstractFactory), creator mode (Builder), the prototype model (Prototype), Singleton (Singleton).

2. Structural modes. Dependencies between subjects and objects of the composition, structure, how to design objects, inheritance and dependencies will affect the maintenance of the follow-up procedure, robustness, coupling of the code and so on. Seven specific structural model for study, they are: Appearance mode (the Facade), adapter mode (Adapter), proxy mode (the Proxy), decorative patterns (the Decorator), bridge mode (Bridge), the combination mode (Composite ), Flyweight (Flyweight).

3. behavioral patterns. Behavioral design pattern is to study the behavior of the object, they are: Template Method pattern (TemplateMethod), observer mode (Observer), state mode (State), Strategy Mode (Strategy), duty chain (ChainofResponsibility), command mode (Command), visitor pattern (Visitor), mediator mode (mediator), the memo mode (Memento), iterative mode (iterator), the interpreter mode (interpreter).

As can be seen from this question figure, class Leaf represents leaf node (part of the node), based Composite represent a combination of node (overall node), which inherits from the parent class Component, while achieving the same operation Operation, which enables customers to a single object using (Leaf class objects) and compound objects (composite class object) having a consistency of questions (44) to select the option C. The combined mode combinations objects in a tree structure to represent "part - whole" in a hierarchical relationship, so the questions (45) to select option B, item (46) A selected option

Answer: (46) A

 

10. Numerical data represented with a binary coded in a computer, with a common coding ()

A, complement

B, ASCII code

C, GB2312 code

D, UFT-8 code

Answers: A

Answer Analysis: The original code, anti-code and complement

 

11. When using the HTML5 drag and drop API implementation, need to listen to "start dragging" event, this event ...

When using the HTML5 drag and drop API implementation, need to listen to "start dragging" event, the name of this event is:

A、dragstart

B bearing

C、drop

D、mousedown

Answers: A

Answer Analysis: Drag and drop is a common characteristic, that is, after crawling drag the object to another location. In HTML5, the drag is part of the standard, any element can drag and drop. First, in order to make the element draggable, set the draggable attribute what drag is true - ondragstart where to put -ondragover ondragover event specified where to place the data being dragged. Be placed - when ondrop when placed dragged data, drop events occur

 

12. With regard to the layout css BFC, the error is described

About css layout BFC, describing the error is

Element area and will float in the region A, BFC overlap

B, and calculating the height of the BFC, the floating elements are also involved in the calculation sub

C, BFC is an isolated separate containers on the page, the sub-elements inside the container to the outside will not affect the elements

D, BFC meaning "block level format context"

Answers: A

Answer Analysis:

Baidu a lot of BFC content summary of an article notes. </ Http:>

 

13.TCP / IP protocol stack position (from top to bottom)?

A, TCP-> IP-> HTTP-> data link layer

B, IP-> HTTP-> TCP-> data link layer

C, HTTP-> IP-> TCP-> data link layer

D, HTTP-> TCP-> IP-> data link layer

Reference answer: D

Answer Analysis: HTTP protocol over TCP protocol usually carried sometimes carried over TLS or SSL protocol layers correct order of HTTP-> TCP-> IP-> data link layer

 

14. The following Doctype and strict mode on HTML and promiscuous mode of description, the error is?

A, the statement is located in the top of the document, before the label in. Tells the browser parser, what type of document to resolve this specification document

B, in the standard mode, the browser renders the page according to the specification; in promiscuous mode, the page is displayed in a more relaxed manner backwards compatibility

C, DOCTYPE does not exist or incorrectly formatted will result in the document presented in standard mode

D, the browser to select the rendering method to use based on whether there is and what DOCTYPE DTD use

Reference answer: C

Answer Analysis: Document Type
DTD (Document Type Definition) is a set of machine-readable rules, they define a specific version of XML or HTML is allowed in what is, what is not allowed. When parsing the page, the browser will use these rules to check the validity of pages and take appropriate action. DOCTYPE declaration by the browser page analysis to know which DTD to use, thus know which version of HTML.
DOCTYPE Currently there are two styles, strict (strict) and transition (transitional). Transitional DOCTYPE purpose is to help developers migrate from the old version to the new version.
If you send a document with the correct XHTML MIME type, the browser will understand XML invalid page does not display.
Browser mode
browser, there are two rendering modes: standard mode and mixed mode (quirks mode). In the standard mode, the browser renders the page according to the specification; in promiscuous mode, the page is displayed in a more relaxed manner backwards compatibility.
DOCTYPE switch
to HTML 4.01 documents,
DOCTYPE contains strict DTD often results in page rendering in standard mode.
DOCTYPE DTD contains excessive and URI also lead to page rendering in standard mode.
But there is no excessive DTD and URI will lead to a page rendered in promiscuous mode.
DOCTYPE does not exist or form incorrectly can cause HTML and XHTML documents presented in promiscuous mode

 

15. For the elements in css3 conversion from one style to another style, the effect of addition of an element attribute?

A、animation

B、keyframes

C、flash

D、transform

Reference answer: D

Answer Analysis:

It is expressed in the title of some low-grade.

Expression should be correct ** element when change from one pattern to another style attributes for the element addition effect **

 

16.HTTPS is a secure HTTP protocol that uses () to ensure information security?

A、IPSec 

B、SSL

C、SET

D、SSH

Answers: B

Answer Analysis:

SSL is a protocol to address the major issues of the Transport Layer Security, which was originally designed to provide a reliable end to end security services on top of TCP-based protocol. The most widely used SSL protocol is HTTPS, which provides support for secure communications between the client browser and the Web server to exchange information. It uses TCP port 443 to send and receive messages.

 

17. Which of the following is not a new increase in HTML5 tags?

A、nav

B、article

C、caption

D、video

Reference answer: C

Answer Analysis:

HTML5 newly added label

External definition label content (structural elements) defined outside the content page content. aside the content associated with the content of the article. (Structural elements) defined in a set of packets of the media content, as well as their titles. (Structural elements) sections (section, section) Definitions document. For example, chapters, headers, footers, or other parts of the document (structural elements) 

 

18. The following jQuery event bindings are correct ____.

A、$(‘#demo’).bind(‘click’,function(){})

B、$(‘#demo’).click(function() {})

C、$(‘#demo’).on(‘click’,function() {})

D、$(‘#demo’).one(‘click’,function() {})

Answers: A

Answer Analysis:

.bind( eventType [, eventData ], handler(eventObject) )

Bind an event handler to an element.

.on( events [, selector ] [, data ], handler(eventObject) )

Bind one or more event handlers on the selected element.

.one( events [, data ], handler(eventObject) )

Additional event to a processing element. Processing function is executed at most once on each element.

 

19. jquery, if you want to get the value of the width of the current window, the following is the realization of this feature?

A、width()

B、width(val)

C、width

D、innerWidth()

Answers: A

Answer Analysis:

 

20. The following protocol does not include a request Http embodiment?
A, OPTIONS

B、HEAD

C、DELETE

D、SET

Reference answer: D

Answer Analysis: No SET

 

Methods 21.jQuery object get () what to do?

A, trigger a request GET OBJECT

B, returns an object

C, the presence of DOM element returns jQuery object

D, triggering a GET AJAX request

Answers: A

Answer Analysis: .get () is one of jQuery AJAX request method

Load data from the server using a HTTP GET request.

 

22. The following statement about the HTTP method, the error is?

A, a server to be compatible with HTTP1.1, as long as the realization of GET and HEAD methods to resource

B, PUT let the server with the main part of the request to create a new document named by the URL requested, or if the URL already exists, you replace it with a dry this subject

C, POST is used to input data to the first server. In fact, often we use it to support HTML form. Data is typically completed form is sent to the server, and the server sends it to the place to go.

D, TRACE method of requesting the web server to inform its various functions supported. What method can query the server support or resources which methods for some special support.

Reference answer: D

Answer Analysis:

HTTP method
a server to be compatible with HTTP1.1, as long as the GET and HEAD methods to achieve resource can
GET is the most commonly used method, commonly used to send a request to the server resources.
HEAD and GET similar, but the server in response to the value returned headers, does not return the main part of the entity
PUT allow servers to the main part of the request to create a new document named by the URL requested, or if the URL already exists, this body to replace it with a dry
POST is used to input data to the first server. In fact, often we use it to support HTML form. Data is typically completed form is sent to the server, and the server sends it to the place to go.
TRACE initiates a loopback diagnostic purposes in the server, the server the last station and will snap back a response and carries TRACE original request packet it receives in the response body. TRACE method is mainly used for diagnosis, for verifying whether a request to do so through a request / response chain.
OPTIONS method request to the web server to inform its various functions supported. What method can query the server support or resources which methods for some special support.
DELETE requests the server to delete the specified resource request URL
 

23. When the form is included in the file upload control, need to be set to enctype ()

A、application/x-www-form-urlencoded

B、multipart/form-data

C、text/explain

D、file-data

Answers: B

Answer Analysis:

 

 

24. Which is not the default browser born inline-block label (own intrinsic size, you can set the aspect, does not automatically wrap)?

A、<button>

B、<input>

C、<label>

D、<img>

Reference answer: C

Answer Analysis:

To understand display: inline block difference,, inline-block, we need to understand the characteristics of HTML block-level (block) element and row-level (inline) elements, inline elements, also known as inline elements. Block elements always starts a separate line; height, line height, and a top, bottom margin can be controlled; default width of the container in which it was 100%, unless a set width. Block-level elements typically used as a container for other elements, can accommodate inline block elements, and other elements. block element HTML tags as follows: address- block address blockquote- center- reference block centered div- common block elements dl- interactive form definition list form- fieldset-form the control group hr- horizontal rule ordering form ul- non-ol- p- dir- ordered list directory list pre- formatted text paragraph isindex-input prompt menu- ... h1 of the menu list table table- h6- title noframes-frames optional content (that do not support frame of the browser to display the contents of this block) noscript- optional script content (does not support script browsers display this content) row-level elements and other elements in a row on; height, line height, and a top, bottom margin can not be changed; it contains, the height is the width of the text or image can not be altered. It is generally based on a semantic level (Semantic) basic elements, only text, or other inline receiving elements, HTML tags inline elements classified as follows: a- anchor abbr- Acronym acronym- first word font- font set (not recommended) b- bold (not recommended) big-bidi override em- stressed br- wrap small- strong- small font text highlighted in bold italics img- i- picture input- input box label- table tags select- project selection textarea- multi-line text input box u- var- underlined variables defined reference cite- code- computer code (required when referring source) dfn- define custom keyboard fields kbd- text references q- short dash s- (not recommended) Strike - underlined sub- subscript sup- superscript tt- teletext some HTML element is a variable element, the element may be determined as a block element or elements based inline context. applet-java applet button- button del- delete text iframe-inline frame ins- inserted text map- picture block (map) object-object target script- client script display: block element is to be displayed as block-level elements, display : inline element will be displayed as inline elements. display: inline-block element will be displayed as inline elements, but the content of the processing elements as a block element. Next to the inline element and the object displayed on the same row, and the space allowed, but this element has a characteristic block elements, which can be provided height, width, and other attributes. When the content of the elements different heights on the same line, usually provided as alignment vertical-align: top; To align with the top element. Compatibility using the CSS display: inline-block; to style, the Firefox, Safari, Google Chrome and IE 8 or more is effective. However, in the early IE, such as IE 7, the line elements disposed on the inline-block can not achieve the effect of the inline-block. Just triggered a layout block elements, and inline elements is itself a line layout, so the trigger is still the line layout. The following versions of IE8, you can use the following two methods to achieve the effect of inline-block: the first with display: inline-block trigger block element attribute, and then define the display: inline, let block elements rendered as inline objects (principle: this is a classic bug IE, if the first definition display: inline-block, and then set back to display inline or block, layout will not disappear), as follows: 1 div {display: inline-block;} 2 div {display : inline;} block element to inline objects (display: inline), then zoom: 1 layout triggering block elements, as follows: div {display: inline; zoom: 1;}

Second, multiple choice (6 questions, each question 5 minutes)

1.JavaScript function argument variables of internal arguments, right there?

A, arguments of all functions are included in a local variable array is a class object that corresponds to the argument when the function call, the function definition with the same name if the parameter overrides the default object when invoked

B, when arguments will also modify arguments [index] corresponding argument when the function call, and arguments by modifying argument

C, arguments.callee itself as a function currently being performed, using the recursive property should pay attention to this change when calling

D, arguments.length is the number of arguments (Function.length parameter indicates length)

Answer: A, B, C, D

Answer Analysis:

Internal variables which function arguments properties, which properties, how to convert it to an array of
arguments of all functions are included in a local variable array is a class object that corresponds to the argument when the function call. If a function definition with the same name overrides the default parameters when invoking the object
will also modify arguments when arguments [index] when the corresponding function call arguments, and the argument by modifying arguments
The arguments.length number of arguments (Function.length represents a length parameter)
the arguments.callee is currently executing the function itself, it is noted that this change in property when using recursive calls
arguments.caller is called the current function of the (already abandoned)
into an array: var args = array .prototype.slice.call (arguments, 0);
 

2. The following statement is correct ()

A, display: none; hidden object not retain their physical space;

B, visibility: hidden; spatial position occupied still exists, visual only completely transparent;

C, visibility: hidden; generating reflow and repaint (reflux and redraw);

D, visibility: hidden; and display: none; no essential differences between the two;

Answers: A, B

Answer Analysis:

 

 

3. With regard to the grid system, the following statement is correct

A, there will be an automatic padding style

B, there will be an automatic margin style

C, the default font is 14px

D, which is the default box-sizing border-box

Answers: A, C, D

Answer Analysis:

This question has enormous problems. The grid system is divided into 161 224 page column. You can only be a good division like. It is necessary to create a certain interval it. To better understand we create a grid of 10 bar. So 10% of the width of each column. No column spacing. You can say he is not called a grid system?

 

4. assume MySQL database table structure is as follows, which sql statement query can be better to use an index?

create table T{ k int unsigned not null auto\_increment, a date, b varchar(24), c int,d varchar(24), primary key(k),unique key a\_index (a DESC,b DESC), key k1(b),key k2(c),key k3(d) );

A、select b from WHERE b like 'aaa%';

B、select a,b from T WHERE a='2015-10-25' ORDER BY b ASC,c ASC;

C、select a,b,c from T WHERE a='2015-10-25' ORDER BY b ASC;

D、select a,b,c from T WHERE a='2015-10-25' ORDER BY a,b;

Answers: A, D

Answer Analysis:

Title index b is descending, and B, C are two options in ascending order, it becomes less efficient. And A, D two ascending descending option is not specified, it will be operated in accordance with its index defined a desc, b desc, and therefore higher efficiency. Therefore selected from A, D.

 

5. Which of the following is the correct introduction of CSS files to html in the way? ()

A、<link rel="stylesheet" type="text/css" href="test.css">

B、<link rel="stylesheet" type="text/css" src="mystyle.css">

C、<style type=”text/css”>body{color:red}</style>

D、<style type=“text/css" src="test.css"></style>

Answers: A, C

Answer Analysis: I ask is the original title was written, or get website

 

6 may be included in the head tag of the HTML page has

A、<title>

B、<meta>

C、<body>

D、<link>

Answer: A, B, D

Answer Analysis: tag is used to define the document's head, it is a container for all the head elements. The elements can be referenced scripts, instruct the browser where to find style sheets, provide meta-information and so on. The following labels are available in the head section

 

Share content limit from time to time :( join the group 677 079 770 for more answers to interview questions and learning materials.)

 ★ Tencent Senior PHP Engineer written questions 

 ★ one hundred million PV high concurrency scenarios order handling 

 ★ laravel development Lynx mall Component Services 

 ★ banners TV video broadcast infrastructure project combat 

 

 

 

 

 



Guess you like

Origin www.cnblogs.com/993089249a/p/11613240.html