JavaScript function definition, parameter call

I. JavaScript functionsFunction: a function is an encapsulation, event driven, or reusable block of code that executes when it is called.Define function:Function function name (){Function body;}The number will not be automatically executed. It needs to be called before it can be executedFunction name ();Function naming rules:Consistent with var ...

Added by Kookedoh on Mon, 02 Dec 2019 06:55:12 +0200

echarts drawing scatter map on map (any point)

Project requirements: draw a scatter map on the provincial map. The scatter location may not be any city or district or county, that is, any point By querying the official website documents, find a Demo similar to the requirements: https://www.echartsjs.com/gallery/editor.html?c=scatter-map , change the code, and replace the map of China with t ...

Added by loopt on Mon, 02 Dec 2019 02:25:03 +0200

Using random number and timer to make a simple pseudo-random lottery game

1 <!DOCTYPE html> 2 <html> 3 <head> 4 <meta charset="UTF-8"> 5 <title></title> 6 <style type="text/css"> 7 *{ 8 margin: 0; 9 padding: 0; 10 } 11 .box1{ 12 width: 700px; 13 ...

Added by SycoSyco on Mon, 02 Dec 2019 00:43:55 +0200

Using jquery to realize text box input effect: text display one by one, disappear one by one, and repeat

Two days ago, I saw a small special effect in the input box of a website: the text is displayed one by one, and when it reaches the maximum length of the string, it will disappear one by one, and then it will reappear and disappear, displaying the string array in a circular way. I was a little curious about this special effect, so today I tried ...

Added by alexcmm on Sun, 01 Dec 2019 20:12:27 +0200

js export Excel table

js export Excel table Direct code: Red part: if there is a value such as "1 / 1" in the table data, it will be converted to the date "January 1" in the exported Excel, so the two sentences in red are added. If there is no such format in the return value, the red part can be left blank. 1 //Excel download 2 function base64 ...

Added by jmaccs64 on Sun, 01 Dec 2019 14:15:02 +0200

Notes on advanced JavaScript programming: BOM

BOM (browser object model) provides many objects for accessing browser functions, which are independent of any web page content. window object global scope There is a difference between defining global variables and directly defining attributes on the window object: global variables cannot be deleted through the delete operator, but attribut ...

Added by maheshbaba on Sun, 01 Dec 2019 10:19:37 +0200

Simple usage and installation of nodejs websocket

I can't understand a lot of WebSockets on the Internet. I have to watch a video to understand them Video link: https://blog.csdn.net/QQ408896436/article/details/81606553 The following are all based on the steps of the teacher First open cmd or powershell, type cd to enter the server address, and then type NPM install nodejs websocket And no ...

Added by electronish on Sun, 01 Dec 2019 06:45:02 +0200

Sorting out the learning notes of React beginner -- events

1. Event definition The name of the React event binding attribute is written in camel style, not lowercase. If you use JSX syntax, you need to pass in a function as an event handler instead of a string Define the function in the class component and call it by this. Function name class GreateH extends React.Component{ static defaultProps = { ...

Added by mdj on Sun, 01 Dec 2019 01:36:31 +0200

How to solve the problem triggered by change when using El select in vue elementUI

change event of El select When we modify the El select value, the change event will be triggered, so we can change the value of the v-model, as shown below at the beginning of use <el-table-column align="center" label="Machine platform"> <template slot-scope="scope"> <el-select clearable filterable ...

Added by aidema on Sat, 30 Nov 2019 15:09:49 +0200

Cascade in Element dynamically loads provincial / city / district data

The cascade in element is actually a way to dynamically load secondary options.The principle of this method is to use address (Reference) transmission and dynamic modification: options. var c={name: 'bob'} var d=c d.name = 'tom' console.log(c) // {name: "tom"} http://element-cn.eleme.io/#/... It becomes a very troublesome problem to find out wh ...

Added by zartzar on Sat, 30 Nov 2019 08:38:00 +0200