当前位置:网站首页>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
边栏推荐
- Database programming of node
- 查漏补缺(八)
- China creates vast research infrastructure to support ambitious climate goals
- .Net Core 下使用 Quartz —— 【6】作业和触发器之触发器的日历
- .Net Core 下使用 Quartz —— 【5】作业和触发器之触发器的通用属性和优先级
- freeCodeCamp----time_calculator练习
- Node data flow
- New type of dark energy could solve Universe expansion mystery
- 百度地图案例-缩放组件、地图比例组件
- ASP.NET CORE 配置选项(上篇)
猜你喜欢
随机推荐
【批量更改mysql表以及表中字段对应的编码】
Multi cycle verification of El form
千呼万唤始出来
js更改全部变量失败后改成return方法,终于解决解决问题
excel快速自动填充空白单元格上一行的内容
1-3 组件与模块
查漏补缺(二)
Promise(四)
.Net Core 下使用 Quartz —— 【2】作业和触发器之初步了解作业
Oracle改成mysql
Promise(三)
五个路由守卫的使用
sqlserver性能优化建议
leetcode之爬楼梯方法数
js中entries(),keys(),values() , some(), Object.assign()遍历数组用法
Offset et client pour obtenir des informations sur l'emplacement des éléments Dom
Node data flow
【Markdown笔记】
.Net Core 下使用 Quartz —— 【5】作业和触发器之触发器的通用属性和优先级
DNA reveals surprise ancestry of mysterious Chinese mummies