Javascript WebSocket 使用例子

JavaScript例子:函数中的arguments对象
arguments
is an array-like object accessible inside functions that contains the values of the arguments passed to that function.The CSS attribute selector matches elements based on the presence or value of a given attribute.
/* <a> elements with a title attribute */
a[title] {
color: purple;
}
/* <a> elements with an href matching "https://example.org" */
a[href="https://example.org"]
{
color: green;
}
/* <a> elements with an href containing "example" */
a[href*="example"] {
font-size: 2em;
}
/* <a> elements with an href ending ".org" */
a[href$=".org"] {
font-style: italic;
}
/* <a> elements whose class attribute contains the word "logo" */
a[class~="logo"] {
padding: 2px;
}
HTML术语:Caret
A caret (sometimes called a "text cursor") is an indicator displayed on the screen to indicate where text input will be inserted.
Caret也叫做:文字光标
许多现代浏览器都不支持在登录字段中设置 autocomplete="off"
,
autocomplete="new-password"
达到防止自动填充的效果。