Alibaba 2019 end engineers face questions and answers to resolve

First, multiple choice (a total of 21 questions, each question 5 minutes)

Specified event (like click) 1. for each specified element to bind an event handler function, which is used to achieve the following function?

A、trigger (type)

B、bind(type)

C、one(type)

D、bind

Answers: B

Answer Analysis: No

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

2. Which html box model correct wording of the border?

A、p{ border:5px solid red;}

B、p{border:5px <br> red solid; }

C、p{border: red solid 5px; }

D、p{border: solid red 5px; }

Answers: A

Answer Analysis: For readability of the code, written in accordance with the recommendation, border-width, border-style, border-color, order.

But in fact it does not affect the order of exchange is presented

3. With regard adapter mode, the error is saying?

A, adapter inherited or dependent objects that already exist, to achieve the desired target interface

B, the main solution in the software system, often want some "existing object" into the new environment, new environmental requirements and the interface is now the object can not be met

C, create a family of algorithms, encapsulate them, so that they can replace each other, this mode allows the algorithm change does not affect customers using an algorithm

D, and convert a class interface clients expect another interface. Adapter pattern makes those classes otherwise because of incompatible interfaces can not work together to work together.

Reference answer: C

Answer Analysis: Convert the interface of a class into another interface clients expect. Adapter pattern makes those classes otherwise because of incompatible interfaces can not work with the adapter can work with inherited or dependent objects that already exist, to achieve the desired goal is mainly to solve the interface in the software system, often we want some "existing object" put to a new environment, new environmental requirements and the interface is now the object can not be met

 

4. The following documents CSS color by way of set in an HTML document has a red background is wrong :()

A, inline style sheet: <body style = "background-Color: red"> </ body>

B, embedded style sheet: <style> body {background-Color: red} </ style>

C, Waibuyangshibiao: creating a directory in the current file test.css, declare a <style> body {background-Color: red} in the file </ style> tag and the HTML document by the <link style = " text / css "rel =" stylesheet "href =" test.css "> be linked to this document

D, input stylesheet: creating a directory in the current test.css document, a declaration in the file body {background-Color: red} code and HTML document by <style> @import url (test.css); </ style> input to this document

Reference answer: C

Answer Analysis: No

 

5. in HTML5, which is the method used to obtain the user's current location?

A、getPosition()

B、getCurrentPosition()

C、getUserPosition()

D、getLocation()

Answers: B

Answer Analysis: getCurrentPosition () Gets the user's current location into a value stored, getLocation () Location Map

 

6. For the drop-down menu, the error is?

 

 

A, it shows a drop-down menu has five drop-down option

B, <span class = "caret"> </ span> functions can be eliminated without affecting

C, can be added to the menu to pull-right right-aligned

D, then added dropdown-menu-right so that the right alignment menu

Answers: A

Answer Analysis: This question I saw immediately that A is wrong, but let me tangled for a long time, how would there be such a low-level problem, you empty city

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

7. The following description of the CSS layout is not correct? ()

The following description of the CSS layout is not correct? ()

A, block-level elements that are actually occupied by the width of its width property related;

B, block-level elements that actually occupied by the width of the border attribute related;

C, block-level elements that are actually occupied by the width of its padding property related;

D, block-level elements that are actually occupied by the width of its properties related background.

Reference answer: D

Answer Analysis: D block elements actually occupied width = width + border * 2 + padding * 2 + margin * 2 so that the width border padding margin, but not with background

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


8. The result is the following JavaScript code output?

 

 

A、53, 2

B、8, 2

C、error

D, none of the

Answers: A

Answer Analysis: This is an implicit type conversion. The title addition: adding, if there is a string type operation, then another operation value to a string, and finally connected subtraction: if the value is not one of the operation values ​​were invoked implicitly Number () function to convert it to a string operation result of the first row, to '53'. The results of the second row 2, selected from A

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

9. in jQuery, have the following code, the following statement is correct?

 

 

A, this code will not run properly

B, sentence 1 will be executed once

C, statement 1 is executed twice

D, $. () Usage of each function is incorrect

Reference answer: C

Answer Analysis: No

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

10. While different operating systems may be fitted with different browsers. But these browsers conform () protocol.

A、SNMP      

B、 HTTP  

C、HTML   

D、SMTP

Answers: B

Answer Analysis:

Simple Network Management Protocol (the SNMP), a standard set by the network management compositions, the network management protocol capable of supporting

System to monitor whether the device connected to the network has any circumstances give rise to concern on management.

HTTP protocol (HyperText Transfer Protocol, Hypertext Transfer Protocol) is an application layer communication protocol between the client browser and the WEB server or other program.

Hypertext Markup Language (HTML), under application of a Standard Generalized Markup Language, is a specification, a standard, a marker for each section of the page to be displayed by a symbol mark. The nature of the page is the hypertext markup language, by using other Web technologies (such as: script language, common gateway interface, components, etc.), can create a powerful web page.

SMTP (Simple Mail Transfer Protocol, Simple Mail Transfer Protocol), which is a set of rules for transmitting from the source address to the destination address of the message, it is controlled by a relay method letters. SMTP protocol is TCP / IP protocol suite, it helps each computer to find the next destination or transit when sending mail.

 

Attribute value of the position is not included 11.css

A、absolute

B、inherit

C、box

D、static

Reference answer: C

Answer Analysis: absolute, absolute positioning of the forming element, relative to the first parent element is positioned outside the static positioning; position of the element by "left", "top", "right" and "bottom" predetermined attribute; Fixed, generating absolute positioning element relative positioning of the browser window; position of the element by "left" "top", "right" and "bottom" predetermined attribute. relative, to generate relative positioning element for positioning relative to its normal position; static, default value is not located, elements that appear in the normal flow (ignoring top, bottom, left, right or z-index declarations); the inherit, predetermined You should inherit the value of the position property from the parent element.

 

12. The following blocks all belong to a class label that?

A、<div><p><input><span><img>

B、<div><h1><p><img><dl>

C、<span><h1><p><img><dl>

D、<div><p><form><ul><h1>

Reference answer: D

Answer Analysis:

13. With regard to the following HTML code statements is correct?

 

 

 

A, which form a total of 2 rows 3

B, the table border width of 10 mm

C, the table tops in the text display

D, "Company" Cell lines cross 2

Reference answer: C

Answer Analysis:

 

 

14. hash-based algorithms are used in information security?

(1) check the file
(2) a digital signature
(3) authentication protocol
A, (1) (2)

B、(1)(3)

C、(2)(3)

D、(1)(2)(3)

Reference answer: D

Answer Analysis: Application of Hash algorithm in information security is mainly reflected in the following three aspects: (1) we are more familiar with file checksum algorithm parity check and CRC check, check these two are not anti capability data tampering, to some extent they can detect and correct channel errors in data transmission, but can not prevent malicious damage to data. "Digital fingerprint" characteristic MD5 Hash algorithm, making it one of the most widely used file integrity check and (Checksum) algorithm, there are many Unix systems provide computing md5 checksum commands. (2) a digital signature Hash algorithm is an important part of modern cryptography system. Since the operation speed asymmetric algorithms slower, so the digital signature of the agreement, a one-way hash function plays an important role. Hash value of, also known as "digital abstract" digital signatures, statistically can be considered to digitally sign documents themselves are equivalent. And such an agreement, there are other advantages. Authentication Protocol (3) of the authentication protocol also known as Challenge - Authentication mode: transmission channel that may be listening, but the case can not be tampered with, which is a simple and safe way. These are some of the hash and its associated on some basic prerequisites.

 

15. Which statement below can be fixed background image ()

A、background-attachment:fixed;

B、background-attachment:scroll;

C、background-origin: initial;

D、background-clip: initial;

Answers: A

Answer Analysis:

 

 

background-origin

Background-position attribute specified with respect to attribute what position to position.

background-clip

Attribute specifies the background of the drawing area.

 

16. The following options are not able to correctly get this tag :()

<input class="btn" id="btnGo" type="button" value="单击我"></input>

A、  $("#btnGo")

B、  $(".btnGo")

C、  $(".btn")

D、  $("input[type='button']")

Answers: B

Answer Analysis: Note that the title is not selected

 

17. want to achieve http get requests through a remote loading function is the following information about the event in which the jquery?

A、$.ajax()

B、load(url)

C、$.get(url)

D、$. getScript(url)

Reference answer: C

Answer Analysis: No

 

18. When performing object-oriented design, using the Design mode ().

A, reuse the same solution to similar problems

B, improving code portability platform

C, to improve the intelligibility of the code

D, enhance the software easy to install

Answers: A

Answer Analysis: This title examines the basic concepts of design patterns.

The fundamental goal of design patterns is to reuse the same solutions to similar problems, thereby improving the design level of reusability and design level and quality of the software.

 

19. The title tag is placed between which of the following tag of? ()

A, html given html

B、head与head

C, body and body

D、head与body

Answers: B

Answer Analysis: No

 

20. If the label contains the following picture in an HTML page, the options () statement can be achieved hide it functions.

<img id=”pic” src=”Sunset.jpg” width=”400” height=”300”>

A、document.getElementById(“pic”).style.display=”visible”;

B、document.getElementById(“pic”).style.display=”disvisible”;

C、document.getElementById(“pic”).style.display=”block”;

D、document.getElementById(“pic”).style.display=”none”;

Reference answer: D

Answer Analysis: D, display no visible this, visibility have this value

 

21. The following jquery object method, the event delegate is

A、bind

B、mousedown

C、click

D、change

E, is

Reference answer: E

Answer Analysis:

jQuery to achieve the three methods of event delegation:

$ .on: basic usage: $ ( 'parent.') on ( 'click', 'a', function () {console.log ( 'click event on tag a');}), which is .parent element. above events under a proxy to elements $ ( '. parent'), as long as the click event on this element, it will automatically find the elements under a .parent elements, and then respond to events;
$ .delegate: basic usage: $ ( 'parent.') delegate ( 'a', 'click', function () {console.log ( 'click event on tag a');}), supra, and also the corresponding $. delegate to remove the agent of the event;
$ .live:. basic use: $ ( 'a', $ ( '. parent')) live ( 'click', function () {console.log ( 'click event on tag a ');}), as above, but if no incoming parent layer elements $ (parent), that event will be entrusted to default on $ (document); (repealed)
event delegate principle:
event commissioned by event bubbling principle, the use of parent to child trigger event.
If no event delegate, will each li have to add at ul click event listener, very troublesome, but also for memory consumption is very large, you need to consume a lot of performance on efficiency;
the other is if the child node js dynamically created, need to re binding events.

The use of event delegation, then just give the parent a binding event listener, you can let each li are binding on the corresponding event, so you avoid adding event listeners for each specific node; event listener is adding to their parent element. Event listener will analyze bubbling up from the sub-elements of the event, find events which sub-elements Yes.

More --JavaScript event delegate Detailed

 

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

1. When an inherited attribute value element is not specified, then the calculated value with the attribute of the parent element taken, the following which are not ...

When an inherited attribute of the element does not specify a value, then take the calculated value of the parent element with the property, which inherits the following attributes are not in CSS?

A、color

B、display

C、border-style

D、text-align

Answers: B, C

Answer Analysis:

不可继承:display,margin,border,padding,background,height,width,position

 

2. In the following labels which are struts tag

A、html:form

B、html:text

C、html:errors

D、html:message

Answer: A, B, C, D

Answer Analysis: No

 

 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/11612798.html