当前位置:网站首页>Leak detection and vacancy filling (IV)
Leak detection and vacancy filling (IV)
2022-04-23 06:51:00 【KK should continue to work hard】
XMLHttpRequest object
XMLHttpRequest Object's readyState And status The meaning of several status codes :
readyState There are five states :
- 0 ( uninitialized ): (XMLHttpRequest) Object created , But it's not called yet open() Method ;
- 1 ( load ): Has called open() Method , But the request has not been sent ;
- 2 ( Loading completed ): The request has been sent ;
- 3 ( Interaction ): Partial response data can be received ;
- 4 ( complete ): All data has been received , And the connection has been closed .
status It is actually a kind of auxiliary state judgment , It's just status It's more about the state judgment of the server side . About status, Only a few commonly used :
6. 1xx—— Information class , To indicate receipt of Web Browser request , In further processing . Such as ,100: Customer must continue to request ;101: The client requires the server to convert according to the request HTTP Protocol version
7. 2xx—— success , Indicates that the user request was received correctly , Understanding and handling . for example ,200:OK;201: Prompt for new documents URL
8. 3xx—— Redirect , The request was unsuccessful , The customer has to take further action . Such as ,300: The requested resources can be obtained in many places ;301: Delete request data
9. 4xx—— Client error , Indicates that the request submitted by the client has an error . Such as ,404:NOT Found, It means that the document referenced in the request does not exist .
10. 5xx—— Server error , Indicates that the server cannot complete the processing of the request . Such as ,500, The server generated an internal error
Be careful :status Property returns the status code , No, statusCode This attribute
dl list
dl The tag defines a list of definitions , among dt(“definition title”, Define the title ) and dd(“definition description”, Definition description ) Created .
<dl>
<dt></dt>
<dd></dd>
</dl>
Semantic understanding
- div The element itself has no semantics , But it can be combined with class、title、lang Property to represent a set of semantic content
- time Element is used to represent time 、address Element is used to represent the address
- fieldset Tags group form controls ,legend The label is fieldset Label definition title , Use two labels together
<fieldset>
<legend></legend>
</fieldset>
Data serialization technology
- JSON
- Property List
- Protocol Buffer
noscript label
Define the alternative content when the script is not executed
h5 You can omit the element of the end tag
- dd
- dt
- li
- p
- optgroup: hold option Put together
<select>
<optgroup label="label1">
<option></option>
<option></option>
</optgroup>
<optgroup label="label2">
<option></option>
<option></option>
</optgroup>
</select>
//label must , Equivalent to category name
- option
- rt
- rp
- thead
- tfoot
- tr
- td
- th
Object.keys()
Returns an array of enumerable properties of a given object
function a(a)
{
a^=(1<<4)-1;
return a;
}
a(10); //5
<< Move left , First into 2 Base number ,1 by 01, Then move left 4 position , become 010000, Turn it into 10 Base number ,10000( Binary system ) = 16( Decimal system ).
a^=16-1=15
a=a^15 = 10^15
^ Exclusive or operation :10 Binary system 00001010,15 Binary system 00001111
00000101 To decimal :5
Bitwise exclusive or operation , A fellow 1 Or both 0 take 0, Different take 1
Browser object
Objects related to browsing lists :
History Object contains user ( In the browser window ) Visited URL
Location Object contains information about the current URL Information about
Window Object represents an open window in the browser
Navigator Object contains information about the browser
iframe Usage scenarios of
- ajax Upload files .
- Resource loading : Load other website content , for example google advertisement , Website traffic analysis .
- To upload pictures , Avoid refreshing the current page : When uploading pictures , no need flash Achieve no refresh .
- When accessing across domains, you can use iframe, Use iframe Request resources under different domain names .
- Left fixed right adaptive layout
- Share with pages under third-party domain names cookie
ID regular expression :
https://www.cnblogs.com/ifat3/p/8570062.html
JavaScript It's single threaded , The browser implements asynchronous operation , Whole js Programs are event driven , Each event will be bound with the corresponding callback function (Ajax Asynchronous execution calls are based on Event and callback)
CSS Percentage reference question
- The element that refers to the width of the parent element :padding margin width text-indent
- An element that refers to the height of the parent element :height
- Refer to the parent element attribute :font-size line-height
- special : Relative positioning ,top(bottom) left(right) It refers to the height and width of the content area of the parent element , When absolute positioning, it refers to the nearest positioning element, including padding Height and width of
html5 Manual semantic tags :
- article
- section
- aside
- hgroup
- header
- footer
- nav
- time
- mark
- figure: Define independent stream content , For example, the picture 、 Photographers 、 Picture information is written in a figure Next
- figcaption: Definition figure The title of the element
- contextmenu+menu
Trigger reflow Reflux conditions
- Font size changes (font)
- Window size changes (scroll)
- Style sheet add or delete
- JS change DOM Elements
- hover action
- Position calculation
- User input
- Change style properties
- width/height/border/margin/padding Modification of
- Read some properties of an element (offsetLeft、offsetTop、offsetHeight、offsetWidth、scrollTop/Left/Width/Height、clientTop/Left/Width/Height、getComputedStyle()、currentStyle(in IE))
Be careful :visibility Preserve physical space , Even if it's set visibility:hidden But the page structure has not changed , All will not trigger reflow
版权声明
本文为[KK should continue to work hard]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204230551363856.html
边栏推荐
猜你喜欢
随机推荐
七牛上传图片(前台JS+后台C#API获取token)
Leak detection and vacancy filling (II)
The difference between VaR, let and Const
file_get_contents 访问 ssl 错误的两种解决方法
Node data flow
低代码开发平台整理
查漏补缺(一)
深入理解控制反转和依赖注入
数据可视化基础了解
浏览器中堆栈内存的底层处理
Redux概述
1-1 NodeJS
启用AHCI后无法启动系统
各进制数之间的互相转换
小程序学习笔记(一)
PHP 无限极分类和树形
Multi cycle verification of El form
oninput 一个函数达到控制多个oninput的效果(将本输入框的内容作为参数)【很实用,很实用】
freeCodeCamp----prob_calculator练习
Counts the number of occurrences of each character in the string