Coding problem in JS
Https://www.haorooms.com/post/js_escape_encodeURIComponent
I in the front-end JS Add time to create the DOM, there are Chinese characters, found to be garbled on the study of the next
For character encoding
javascript:escape("\u6625\u8282");//输出 "%u6625%u8282" javascript:unescape("%u6625%u8282");//输出 "春节" javascript:unescape("\u6625\u8282");//输出 "春节"
For URL Chinese character coding
encodeURIComponent()相比encodeURI()要更加彻底。decodeURI()
JS string formatting
When I created the DOM at the front-end JS Add, I found that I could not make the string concatenation, not the way to create the object.
50570406
var s="my name is %s, I'm %s years old, and I have %s brother."s=s.format("wendy",24,2)结果s为:"my name is wendy, I'm 24 years old, and I have 2 brother."
Prevent browsers from recording text boxes before they are entered
Https://baijunyao.com/index.php/article/17
<input class="text" autocomplete="off" type="text" name="word" value="输入商品名称">
Per modal box JQ empty
This is when added, the Popup modal box always has the last record.
https://www.formget.com/jquery-reset-form/
$(selector)[0].reset();
[JavaScript] encoding &i string formatting &nput history & Empty Modal Box