1. What is the difference between defining the width of a table in HTML with 80% PX and?
Px indicates the pixel, and % indicates the percentage of the page width.
2. Briefly describe the differences between DIV elements and span elements.
By default, div is displayed as a branch, and span is displayed in the same row.
3. What are the position values in the HTML page layout? What is the default value?
1) The position values are static, relative, absolute, fixed, and inherit.
2) The default value of position is static.
4. How to center a layer with a width of PX and a height of PX vertically in the browser? Write the CSS style code.
Here the percentage and absolute positioning are used. The negative value is half the width and height of the patch.
5. What is the meaning of a name after a. (period) in the CSS specification? # What is the meaning of a name after (well number? If you want to set a CSS style (embedded style) for an element, you should write the CSS style in its attributes?
1). (full period) followed by a name to indicate that all class attribute values in the document contain the application style of this name,
2) # (well number) follow a name to indicate that the style is applied to the element whose ID is the name in the document.
3) CSS styles are written in the style attribute.
6. What does CSS mean? Why CSS technology should be used in creating web pages?
CSS (Cascading Style Sheet) is also called a cascading style sheet, which is used to control the appearance of one or more elements on a webpage. When creating a webpage, you can use a style sheet to reduce repeated settings with the same appearance and elements, which makes the design and maintenance of the webpage very convenient. The specific application is as follows: if you change the definition of an element display style in a style sheet, the display style of the corresponding element in all webpages that use the style sheet will automatically change.
7. What are the advantages of CSS + Div web page development?
1) CSS + Div: In this webpage design mode, div undertakes the webpage content, and CSS undertakes the webpage style. In this way, the content and style of the webpage are separated. This is conducive to page maintenance and upgrade.
2) It helps to improve search engine affinity (quickly find the desired data, rather than searching in a table layer by layer)
3) it is helpful for page reconstruction (for skin change, such as blog, you can simply apply another set of styles without modifying the webpage script .)
8. An HTML document must contain three elements: Head, body, and which one?
Html
9. Document inline comments in HTML should be To End
10. How can I reference CSS styles?
1) import an existing CSS file: 2) declare a CSS code segment in hard:
3) directly declare the CSS style: Style = "color: red;" in the webpage element ;"
11. What are the differences between setTimeout and setinteval functions in JavaScript?
SetTimeout is executed only once, and setinteval has no limit on the number of times.
12. Write a Javascript script to generate an integer between 1 and 6?
VaR nowframe;
Nowframe = math. Random () * 6 + 1 // randomly generate a decimal number between 1 and 6
Nowframe = parseint (nowframe) // converts decimal places between 1 and 6 to integers.
13. What attributes can be set to hide and display a div? What are the values?
1) This layer is hidden when the diasplay attribute value is set to none.
2) When the diasplay attribute value is set to block, this layer is displayed.
14. What is the role of isnan in JavaScript scripts?
Isnan is used to determine whether the value is a number.
15. How can I obtain an element in JavaScript?
Document. getelementbyid (); this method is used to obtain an element named ID.
Document. myform. xxx; this method is obtained by Hierarchy
Document. getelementsbyname (); this method is used to obtain all elements with the same name
16. What are the advantages and disadvantages of Ajax?
Advantages of Ajax:
1) The page is refreshing and the user experience is very good.
2) use asynchronous mode to communicate with the server, with more rapid response capabilities.
3) Some server workload can be transferred to the client, and the client's idle capabilities can be used to deal with it, reducing the server workload and saving space and broadband rental costs. In addition, to reduce the burden on the server, Ajax adopts the principle of "retrieve data on demand", which can minimize the burden on the server caused by redundant requests and responses.
4) based on standardized and widely supported technologies, you do not need to download plug-ins or small programs.
Disadvantages of Ajax:
1) Ajax does not support browser Back buttons.
2) security issues. Ajax exposes the details of interaction with the server.
3) weak support for search engines.
4) destroys the program exception mechanism.
5) debugging is not easy.
17. Briefly describe how Ajax works.
The core of AJAX is the JavaScript Object XMLHttpRequest. This object was first introduced in Internet Explorer 5. It is a technology that supports asynchronous requests. In short, XMLHttpRequest allows you to use JavaScript to request and process responses to the server without blocking users.
18. What types of data are available in JavaScript? What are the differences?
There are 7 types of data in javascript:
1) number numeric type
2) string type
3) Boolean Type
4) Function
5) object
6) null
7) undefined does not define the type
19. In JavaScript scripts, what is the result of expression 2 + 5 + "8? And explain the cause.
Because 2 and 5 are numbers and "8" are strings, the result of the addition is 78.