1 Selection Questions
1.1 By default, what is the effect of using the P mark ()
A. Add 8 spaces to the position of the text p
The text behind the B.P becomes bold
C. Start a new line
The text behind the d.p becomes italic.
Answer: C
What is the role of the 1.2 meta element ()
The A.meta element is used to represent the format of an HTML document
The B.meta element is used to specify information about the relevant HTML document
The C.meta element is used to automate the refresh of this page
D. None of the above is correct
Answer: B
1.3 We made an image in the HTML page, want to be able to point to this image when the mouse surfaced a message, which parameter should be used to do ()
A.pop
B.src
C.alt
D.msg
Answer: C
1.4 Use any of the following elements to add a sound to a Web page ()
A.sound
B.bgsound
C.music
D.voice
Answer: B
1.5 in the following HTML code, which is the correct code to display the word "Hello" as a Verdana font with a font size of 5th number ()
A.<font size= "5" font= "Verdana" >Hello</font>
B.<font size= "5" face= "Verdana" >Hello</font>
C.<font size=5 face=verdana>hello</font>
D.<font size=5 face= "Verdana", text= "Hello" </font>
Answer: B
1.6 In the <param> tab, which of the following attributes is used to pass content to the parameter ()
A.address
B.value
C.amount
D.method
Answer: B
1.7 A folder name is called parent, which has a file called test.asp, and a folder named child. Under child there is a file named Default.htm, want to make a connection in Default.htm, chain to test.asp. The following is correct ()
A.<a href= "/test.asp" >...</a>
B.<a href= "c:/test.asp" >...</a>
C.<a href= "‥/test.asp" >...</a>
D.<a href= "parent/test.asp" >...</a>
Answer: C
1.8 Window objects are objects that represent InternetExplorer windows, and their properties, methods, and events can be used directly without qualification. For example Window.alert "Stop" can also be written directly: Alert "Stop" This is correct or wrong ()
A. Correct
B. Errors
Answer: A
1.9 Statement a:html The document must include the "header" and "principal" two-part statements b:html documents with the extension. htm or. html The following statements are correct:
A. Two sentences are all right
B. Two sentences are wrong
C. Only a pair
D. Only B Pairs
Answer: D
1.10 What to do if you want to place the text in the table centered on top of it ()
A.align= "Middle" align= "top"
b.align= "center" align= "Top"
C.valign= "Middle" align= "top"
d.valign= "Top" align= "center"
Answer: D
1.11 The following statement describes the correct ()
A. marginwidth=5 represents the space reserved by the edge of the frame width portion.
B.marginwidth=5 represents frame width space
C.noresize is to set the size without using the box
D.noresize is the user set this parameter, you can arbitrarily pull the frame to change its size.
Answer: A
1.12 Which of the following CSS style definitions have the highest priority ()
A. Embedding
B. In-line
C. Links
D. Import
Answer: B
The 1.13web standard is set by ()
A. microsoft
B. World Wide Web Consortium (www.)
C. Netscape Corporation (Netscape)
D. Sun Corporation
Answer: B
1.14 Which of the following HTML is the largest title ()
A.
B.
C.
D.
Answer: D
1.15 Select the HTML tag that produces italic characters ()
A. <i>
B. <italics>
C. <ii>
D. <it>
Answer: A
1.16 How to make an email link ()
A. <a href= "[email protected]" >
B. <mail href= "[email protected]" >
C. <a href= "Mailto:[email protected]" >
D. <mail>[email protected]</mail>
Answer: C
1.17 How to open a link in a new window ()
A. <a href= "url" new>
B. <a href= "url" target= "_blank" >
C. <a href= "url" target= "new" >
D. <a href= "url" target= "_parent" >
Answer: B
1.18 which HTML tag can be used to define an internal style sheet ()
A. <style>
B. <script>
C. <css>
Answer: A
1.19 the CSS syntax for which of the following options is correct ()
A. Body:color=black
B. {Body:color=black (Body}
C. Body{color:black}
D. {Body;color:black}
Answer: C
1.20 How to insert comments in a CSS file ()
A.//This is a comment
B.//This is a comment
C./*this is a comment */
D. ' This is a comment
Answer: C
1.21 which CSS property controls the size of the text ()
A. font-size
B. Text-style
C. Font-style
D. text-size
Answer: A
The correct syntax to make all <p> elements bold in the CSS below 1.22 is ()
A. <p style= "Font-size:bold" >
B. <p style= "Text-size:bold" >
C. P{font-weight:bold}
D. P {Text-size:bold}
Answer: C
1.23 How to display non-underlined hyperlinks ()
A. A{text-decoration:none}
B. A {Text-decoration:no underline}
C. a {Underline:none}
D. A {Decoration:no underline}
Answer: A
1.24 the correct way to define a JavaScript array is ()
A. var txt = new array= "Tim", "Kim", "Jim"
B. var txt = newarray (1: "Tim", 2: "Kim", 3: "Jim")
C. vartxt = new Array ("Tim", "Kim", "Jim")
D. var txt = newarray:1= ("Tim") 2= ("Kim") 3= ("Jim")
Answer: C
1.25 JavaScript syntax for opening a new window named "Window2" is ()
A. Open.new ("http://www.w3schools.com", "Window2")
B. window.open ("http://www.w3schools.com", "Window2")
C. New ("Http://www.w3schools.com", "Window2")
D. New.window ("http://www.w3schools.com", "Window2")
Answer: B
1.26 preparatory work before commissioning the following description is not correct ()
A. In the Settings list box, locate the two "Disable script debugging" check box to remove the hooks in front of them
B. If the "Disable script debugging" check box is not removed from the front hook, the debug information will not pop up
C. "Disable script debugging" check box, when the previous hook is removed, when the program error will pop up debugging information
D. "Disable script debugging" check box, the front of the hook to go without debugging Independent
Answer: D
1.27 about code optimization The following statements are not correct ()
A. JavaScript program code is written out, mainly to the browser to run
B. Use global variables whenever possible to make your code simple
C. Writing style should follow the principles of "Short and Clear Identifiers", "Code indent Alignment", "annotate as much as possible"
D. The code running on the machine always wants it to be as fast as possible, and its readability is best when reading maintenance
Answer: B
1.28 in an HTML page, the property name of the style object that the CSS style property name Background-image corresponds to IS ()
A.background
B.backgroungimage
C.image
Answer: B
1.29 HMTL The primary mark of the form is that the parameter method of the <form>,<form> tag means that the form is sent, possibly get or post, the following descriptions of get and post are correct ()
The data passed by the A.post method is not visible to the client
B.get request information sent as query string with no size limit for query string length
The C.post method limits the number of data sent to 255 characters
The data passed by the D.get method is not visible to the client
Answer: A
1.30 JavaScript to make a picture instead of a button submission effect requires manual submission method submit () to downgrade with correct yes ()
A.submit ();
B.myform.submit ()
C.document.myform.submit ()
D.window.myform.submit ();
Answer: C
1.31 If you include a slice label in an HTML page, the () statement in the option can implement the ability to hide the picture ()
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";
Answer: D
1.32 on an HTML page, the JavaScript () event is triggered when any key on the keyboard is pressed
A.onfocus
B.onblur
C.onsubmit
D.onkeydown
Answer: D
1.33 of the following JavaScript expressions, the error is ()
A var Tempa, TEMPB, TEMPC
B Tempa *= 3
C Tempa >= TEMPB | | Tempa <= TEMPC
D Tempa >= TEMPB >TEMPC
Answer: D
1.34 in JavaScript, the following code can be closed with a window ()
A Window.exit ()
B Window.shutdown ()
C Window.end ()
D Window.close ()
Answer: D
1.35 The following statement about Web element overflow, correct is ()
A Refers to the location of the page element, distance from the left and top borders
B The location of the page element, the distance from the right border and the bottom border
C Refers to the location of page elements, can be included in the value of absolute
D If the content of a page element overflows, whether to display superfluous content
Answer: D
1.36 if you want to arrange the two layers in the same row, the following description cannot be implemented ()
A Insert two div tags directly, automatically in the same row
B Specify the position property of the div as absolute, and then drag and drop the layer position to the same row
C Specifies the width of the div tag, and specifies its float, which is the same row when the sum of the layers is less than the width of the outer element
D Using a table, place two layers into two cells in a row then cell
Answer: A
1.37 which of the following is the month method for acquiring a Time object GetMonth () feature ()
A The retrieved month is counted starting from 1.
B The retrieved month is counted starting from 0.
C The month obtained is an abbreviation for English words, such as June in June
D Unable to get month
Answer: B
1.38 to find the value of an expression, the function that can be used is ()
A Eval ()
B IsNaN ()
C parseint ()
D Parsefloat ()
E. Return ()
Answer: A
1.39 The following code can get the first form object in the document is ()
A.document.forms[0];
B.document.forms (0);
c.document.forms.0;
d.document.forms.item (0)
Answer: AD
1.40 the "back" link represented by the HTML code of the () section of the following options will correctly implement the function of the back button in the IE toolbar.
A.<a href= "javascript:history.go ( -1)"> Back </a>
B.<ahref= "javascript:location.back ()"> Return </a>
C.<ahref= "javascript:location Go ( -1)"> Back </a>
D.<a href= "javascript:history.back ()"> Return </a>
Answer:AD
2 Question and answer questions
What is the difference between "= =" and "= = =" In 2.1 javascript?
= = When judging, if the type is inconsistent, it will automatically convert the type to be judged.
= = = When judging, if the type is inconsistent, the result is not equal.
What are the scenarios where "this" is used in 2.2 JavaScript ?
The answer is excerpted from: Analysis of the seven usage scenarios of this in JavaScript
Situation one: Global & call normal function
In the global environment, this always points to window.
Scenario Two: Constructors
The so-called constructor is a new object from a function, and the function name of the general constructor is capitalized, such as Object,function,array, which are constructors.
Scenario Three: Object methods
If the function is a method of an object, this point in the method points to the object.
Note: If you define a function in an object method, the situation is different.
var obj = { ten, function () { function f () { Console.log (this); // Window Console.log (this. x); // undefined } f ();} } Obj.foo ();
It can be understood that the function f is defined inside the Obj.foo, but it still belongs to a normal function, and this still points to window.
Here, if you want to invoke the variable obj.x in the upper scope, you can use the self to cache the external this variable.
var obj = { ten, function () { var This ; function f () { console.log (self); // {x:10} Console.log (self.x); // Ten } f ();} } Obj.foo ();
If the Foo function is not called as an object method:
var obj = { ten, function () { console.log (this); // Window Console.log (this. x); // undefined }}; var fn = obj.foo;fn ();
Obj.foo is assigned to a global variable and is not called as an attribute of obj, the value of this is window.
Scenario Four: Constructor prototype property
function Foo () { this.x = tenfunction () { console.log (this); // Foo {x:10, getx:function} Console.log (this. x); // Ten }varnew Foo (); Foo.getx ();
In the Foo.prototype.getX function, this refers to the Foo object. Not only that, but even in the entire prototype chain, this represents the value of the current object as well.
Scenario Five: The function is called with call, apply, or bind.
var obj = { ten}function foo () { console.log (this); // {x:10} Console.log (this. x); // Ten }foo.call (obj); foo.apply (obj); Foo.bind (obj) ();
When a function is called by call, apply, or bind, the value of this takes the value of the passed-in object.
Scenario Six: DOM event this
In an HTML DOM event handler, this always points to the HTML DOM node that the handler is bound to:
Condition Seven: This in the arrow function
When using the arrow function, the situation is different: the inside of the arrow function is the lexical scope, determined by the context.
2.3 What are the different JavaScript libraries or frameworks that you understand or use?
Libraries: JQuery, Highcharts, Echarts.
Echarts
Let's take a general look at the history of Echarts:
Echarts is the front-end development of Baidu Company a chart library.
Supports histogram, pie, K-line, map, heat-map, line-chart
The main use of canvas drawing.
Highchart
Highcharts is a chart library developed by a foreign company, mainly using SVG drawing.
There are also a lot of supported charts and powerful features.
Frame: Vue.js, Requirejs.
2.4 How do jquery objects and DOM objects switch to each other?
The jquery object turns into a DOM object:
Two conversions convert a jquery object to a DOM object: [index] and. get (index);
(1) JQuery object is a data object, you can get the corresponding Dom object by means of [index].
such as: Var $v =$ ("#v"); jquery Object
var v= $v [0]; Dom Object
Alert (v.checked)//Detect if this checkbox is selected
(2) jquery itself provides, through the. Get (Index) method, to get the corresponding DOM object
such as: Var $v =$ ("#v"); jquery Object
var v= $v. Get (0); Dom Object
Alert (v.checked)//Detect if this checkbox is selected
The DOM object is turned into a jquery object:
For a DOM object, you can just wrap the DOM object with $ () and you'll get a jquery object. $ (DOM object)
such as: Var V=document.getelementbyid ("V"); Dom Object
var $v =$ (v); jquery Object
After the conversion, you can use the JQuery method arbitrarily.
With the above methods, jquery objects and Dom objects can be converted to each other arbitrarily. It is important to note that DOM objects can use methods in the DOM, and jquery objects are not available in the DOM.
What is the difference between "ReadOnly" and "disabled" in 2.5 form?
ReadOnly is valid only for input (Text/password) and textarea, and disabled is valid for all form elements, including Select, Radio, CheckBox, Button, and so on.
However, when the form element is used with disabled, when we submit the form as a post or get, the value of this element is not passed out. and ReadOnly will pass the value out (this happens when we set the TEXTAREA element in a form to Disabled or readonly, but the Submit button is available).
How does 2.6 JavaScript implement inheritance?
prototype chains , borrowing constructors, combinatorial inheritance, prototype inheritance, parasitic combination inheritance (best-in-Class), prototype, parasitic.
6 ways to re-understand JS's inheritance
Advantages and disadvantages of 2.7 Ajax
the advantages of Ajax
The benefits that Ajax brings to developers are largely appreciated, as follows:
1, the biggest point is that the page does not refresh, in the page and the server to communicate with the user experience is very good.
2, using the asynchronous way to communicate with the server, do not need to interrupt the user's operation, with more rapid response.
3, can transfer the work of some previous server to the client, take advantage of the client idle ability to handle, reduce the burden of server and bandwidth, save space and broadband rental cost. and reduce the burden on the server, the principle of Ajax is "on-demand data", can minimize redundancy requests, and response to the burden on the server.
4, based on standardized and widely supported technology, do not need to download plug-ins or small programs.
Disadvantages of Ajax
1, Ajax killed the back button, that is, the browser fallback mechanism of destruction. The Back button is an important feature of a standard web site, but it does not work well with JS. This is a serious problem with Ajax, because users often want to be able to undo the previous operation by going backwards. So is there any way to do this question? The answer is yes, using Gmail know, Gmail under the Ajax technology to solve the problem, in Gmail can be back, but it does not change the mechanism of Ajax, it is only a relatively stupid but effective way, that is, the user click the Back button to access the history To reproduce the changes on the page by creating or using a hidden iframe. (for example, when a user clicks back in Google Maps, it searches in a hidden iframe and then reflects the search results on an AJAX element to restore the application state to its current state.) )
However, although this problem can be solved, but the development cost of it is very high, and the AJAX framework required by the rapid development is a divergence. This is a very serious problem caused by Ajax.
2, security issues
technology also poses new security threats to IT companies, and Ajax technology is just like building a direct channel to enterprise data. This allows developers to inadvertently expose more data and server logic than ever before. The logic of Ajax can be hidden from the client's security scanning technology, allowing hackers to create new attacks from remote servers. And Ajax also makes it difficult to avoid some known security weaknesses, such as cross-site footstep attacks, SQL injection attacks, and credentials-based security vulnerabilities.
3, the support of the search engine is weaker.
4. The abnormal mechanism of the program is destroyed. At least for now, these Ajax frameworks, like Ajax.dll,ajaxpro.dll, can disrupt the program's exception mechanism.
5, in addition, like some other aspects of the problem, such as violating the URL and resource positioning of the original intention. For example, there is a URL address, and if you use AJAX technology, you might see below the URL address that is different from what others see under this URL address. This is contrary to the original intention of resource positioning.
6, some handheld devices (such as mobile phones, PDAs, etc.) are not yet very good AJAX support, such as mobile phone browser on the opening of Ajax-based Web site, it is currently not supported.
2.8 Development Debugging tools that were used frequently?
Common debugging tools are Chrome browser Debugging tools, Firefox firebug plugin debugging tools, IE developer tools
Web Front end questions (I.)