ES6(ECMAScript 6) Learning Notes

1. let const block-level scope Deconstructive Assignment of Variables 1. Deconstructive Assignment of Variables let [a, b, c] = [1, 2, 3]; Extract values from arrays and assign values to variables according to their corresponding locations let [foo] = []; let [bar, foo] = [1]; If the deconstruction is unsuccessful, the value of the vari ...

Posted by machiavelli1079 on Sun, 09 Jun 2019 22:24:42 +0200

SpringBoot-WebSocket Broadcast Message + Single Message (Message sent by specified user)

Preface The introduction of WebSocket in Springboot will not be repeated here. There are more introductions on the Internet. This paper mainly solves the problem of broadcasting messages (for a topic) and sending messages to specific users. No more nonsense, start our realization. Environmental Science Only the core technical points are l ...

Posted by 1bigbear on Fri, 07 Jun 2019 23:29:04 +0200

Lazy loading of pictures and exception handling

Picture display is often involved in daily page development.Sometimes when there are too many picture resources, we want to delay the loading of pictures, and when the loading fails, we can use a default picture to display them instead.The effect is shown in the diagram: 1. Lazy loading of pictures In fact, the core idea of lazy loading pictur ...

Posted by inaba on Mon, 03 Jun 2019 18:33:52 +0200

ajax uploads form data

Upload files through traditional form submission: <form id= "uploadForm" action= "http://localhost:8080/cfJAX_RS/rest/file/upload" method= "post" enctype ="multipart/form-data">        <h1 >Test pass Rest Interface upload file </h1>        <p >Specify the file name: <input type ="text" name="filename" /& ...

Posted by SueHubert on Sat, 01 Jun 2019 21:12:20 +0200

[JQuery] JQuery Lesson 6

Explain This article changes from Rookie tutorial. JQuery Gets Content and Properties Get content Three simple and practical JQuery methods for DOM operations: text(): Sets or returns the text content of the selected element html(): Sets or returns the content of the selected element (including HTML tags) val(): Sets or returns the va ...

Posted by holladb on Tue, 28 May 2019 01:54:36 +0200

prototype related methods, jquery type judgment source code analysis.

Preface Introduce the concept of prototype, related attributes, and the implementation of jquery to judge the pure object, and carelessly come in to search for the attributes you want directly ctrl+f. What is prototype isPrototypeOf() || Object.getPrototypeOf() hasOwnProperty() || in jQuery.isPlainObject() Source Code Interpretation What is p ...

Posted by jbardin on Mon, 27 May 2019 23:49:27 +0200

Solution of Web Uploader by Selecting Multiple Pictures at a Time in WEB Edition

Recently, in learning Baidu's open source upload component WebUploader, the last article learned how to upload batch files. Today, learn how to upload batch pictures. Actually, it is very similar to file upload, but it adds image display function, which has been provided in the WebUploader component.    First: The following is a batch file so ...

Posted by tcl4p on Mon, 27 May 2019 00:25:35 +0200

tab toggle between different solutions

tab switch, the front-end gods are familiar with, however, because there are too many occasions, so you may not care about it.I don't know if you want to comb your logic and write it once or use the existing templates or your own libraries when you encounter this kind of situation. Today I summarize my experience and optimize the following poin ...

Posted by DK_Sun on Sun, 26 May 2019 18:32:45 +0200

Solving Ajax Cross-domain Problem-JSONP Principle Analysis

Solving Ajax Cross-domain Problem-JSONP Principle Analysis Why are there cross-domain problems? - Because there are homologous strategies Homology is a security policy for browsers. Homology refers to the protocol in the request URL address. Domain names and ports are the same, as long as one of them is different, it is cros ...

Posted by shimano55 on Sat, 25 May 2019 01:19:08 +0200

Construction of EasyNVR RTSP to RTMP-HLS Streaming Media Server Front-end: Real-time Dynamic Display of bootstrap-datepicker Calendar Plug-in

EasyNVR has the function of retrieving and playback the video, and first put aside the playback of the video, in order to better user experience, so that users can easily and quickly find the corresponding channel corresponding to the date of the video, is a necessary function. Based on the above requirements, a calendar plug-in is added ...

Posted by briant on Sat, 25 May 2019 01:05:13 +0200