(1) If you do not set the height of your parent box, the parent box will be propped up with what you write in the parent box.
(2) If the parent box in which the height is set, but you give the child box to set the float, which the parent box will not be stretched (because the child box itself will deviate from the document flow, so that the result)
(3) Special use of pseudo class:
#four {
width:200px;
height:200px;
background:red;
}
#four: after{
Content: "";
Display:block;
width:20px;
height:20px;
Background:yellow;
}
Do you know. Here you will have a small box with a long width of 20px on the left upper foot of the box with the ID four you set up. If you want to reset the location of the small box, here is the need to set the parent box reltive, to which the child box with the Psition attribute, Here you can make a new arrangement for the location.
(3) The difference between get and post in http:
Get: Fetching data from a specified server
Post: Submit data to the specified server
Get method: When using the Getting method, the query string (the key value pair) is appended to the server together with the URL address:/test/demo_form.jsp?name1=value1& Name2=value2 feature: Get request can be cached by cache Get request can be saved in browser's browsing record with the URL that gets requested can be saved as browser bookmark a GET request has a length limit getting request is used primarily to obtain the data post method: When using the Post method, The query string exists separately in POST information and is sent to the server along with the HTTP request: post/test/demo_form.jsp http/1.1 Host:w3schools.com name1=value1&name2= Value2 Features: Post requests cannot be cached post requests are not saved in browser browsing records the URL of a POST request cannot be saved as a browser bookmark the difference between get and post is not limited by the length of the POST request:
|
get |
POST |
Click return/Refresh button |
no effect |
data will be sent again (the browser will prompt the user "data is resubmitted") |
Add bookmark |
can |
no |
Cache |
can |
can not |
encoding type (Encoding type) |
application/x- www-form-urlencoded |
application/x-www-form-urlencoded or multipart/form-data. Please use multipart encoding for binary data |
History |
has |
no |
length limit |
have |
no |
data type limit |
allow only ASCII character types |
is not restricted. Allow binary data |
security |
The query string appears in the URL of the address bar and is not secure, do not use GET requests to submit sensitive data |
because the data will not appear in the address bar, nor Cached or saved in a browsing record, it is not the safest way to see a post plea than GET request security. If you need to transfer sensitive data, use encryption to transfer the |
Visibility |
query string displayed in the URL of the address bar, visible |
query string will not appear in the Address bar, not visible |
Other HTTP request methods
Way |
Describe |
Head |
Similar to get request, different in the server only return HTTP header information, no page content |
Put |
Upload a description of the specified URL |
DELETE |
Delete specified resource |
OPTIONS |
Returns the HTTP method supported by the server |
CONNECT |
Connection requests converted to transparent TCP/IP tunnels |
(4) The abbr here is to add a underline to the corresponding text or to add the next stroke.
(5) Define a list of its own:
The original form is:
<dl>
<dd></dd>
<dt></dt>
</dl>
Where the DL is the defined list element
Where the DD is represented here is the definition of the header element
Its total dt is here to define the description element
(6) in the JS array of
The array subscript in 1.js is not necessarily a number, and JS can use the string as the subscript for the array.
An array of 2.js does not necessarily require his length at the time of the Declaration.
3 in JS and the array elements can not be the same type, and the array element can also be a variable, the value of an array element can also be an element of another array, the array can also contain other arrays
4. Even if the length of the array is specified, the array is still continuously variable, that is, even if the length of the array is defined, the element can be stored outside the length of the array (the length of which will change itself)
5 addition of array elements:
"1. Arrayobj. Push ([Item1 [item2 [...] [Itemn]]]); /Adds one or more new elements to the end of the array and returns the new length of the array
"2. Arrayobj.unshift ([Item1 [item2 [...] [Itemn]]]); /Adds one or more new elements to the beginning of the array, the elements in the array are automatically moved back, and the new length of the array is returned
"3. Arrayobj.splice (insertpos,0,[item1[, item2[, ...) [, Itemn]]]); /inserts one or more new elements into the array at the specified position, and the element at the insertion point is automatically moved back to "".
Here it is necessary to study the addition of elements in the specified location of the array:
2 3 4 5 6 |
The original array var array = ["One", "two", "four"]; Splice (position, Numberofitemstoremove, item) |