js utility method record - js dynamically loads css and js script files
js utility method record dynamic loading css/js
1. Dynamically load js file to head tag and execute callbackMethod call: dynamicLoadJs(' http://www.yimo.link/static/j... ', function(){alert('loading succeeded')});
/**
* Load JS dynamically
* @param {string} url Script address
* @param {function} callback Callback function
...
Posted by NCllns on Sat, 07 Dec 2019 16:00:23 +0100
Front end and mobile development project III
Animation review parallax scrolling plug-inParallax Scrolling (Parallax Scrolling) refers to the web page display technology that multi-level elements move in different degrees in the process of web page scrolling, forming a three-dimensional motion effect visuallyThe main core is that the foreground and background move at different speeds to ...
Posted by xlxprophetxlx on Sat, 07 Dec 2019 13:33:14 +0100
Notes on source code analysis of element UI switch components
The source code is as follows:
<template>
<div
class="el-switch"
:class="{ 'is-disabled': switchDisabled, 'is-checked': checked }"
role="switch"
:aria-checked="checked"
:aria-disabled="switchDisabled"
@click="switchValue"
>
<input
class="el-switch__input"
type="checkbox"
@change=" ...
Posted by the-botman on Sat, 07 Dec 2019 05:30:37 +0100
js realizes the function of image upload and deeply understands the principle of image upload
js realizes the function of uploading pictures. The effect is to see the pictures first to suppress the shock
Picture upload.gif
Principle:
Structure part: input tag
You may not have noticed that the input tag has the same effect.
1. The type attribute is file
2.accept is the file format allowed to be selected (if it is a pic ...
Posted by fri3ndly on Fri, 06 Dec 2019 10:50:04 +0100
Prototype inheritance, constructor inheritance and combination inheritance
Prototype inheritance
function Person(name,sex){
this.name=name;
this.sex=sex;
this.friends = {lily:'female',lucy:'female'};
this.showFriends=function(){
var str = ''
for(i in this.friends){
str+=i +' '+this.friends[i] +',';
}
console.log('my friends:'+str);
}
}
Person.prototype.h ...
Posted by unknownproto on Wed, 04 Dec 2019 17:42:42 +0100
java synchronization thread
java synchronization thread (2)
Synchronization method
Synchronization method:
Using the synchronized keyword to decorate a method is called a synchronized method.
The synchronization monitor of the synchronization method is this, which is the object itself.
It is very convenient to implement thread safe classes throug ...
Posted by WLW on Wed, 04 Dec 2019 09:26:48 +0100
Form form of react+antd series: format restriction validation
Format restriction
There are many functions of forms in antd. Here are some common forms input format validation in antd:
1. The input box cannot be empty, as follows:
{getFieldDecorator('name', {
rules: [{
required: true,
message: 'Name cannot be empty',
}],
})(
<Input placehold ...
Posted by mikefrederick on Wed, 04 Dec 2019 06:58:09 +0100
Pandas Tour (6): summary of string utility methods
About string basic methods
Hello everyone, I'm back! In the previous several issues, we have simply understood the basic operation of pandas, but as long as the data is involved, the most common type is String, so many times we are actually dealing with strings, so today, I will share my own summary of the common methods about strings to you, h ...
Posted by mistertylersmith on Wed, 04 Dec 2019 01:05:22 +0100
C + + breaking through the black technology of private access
How to break through the private attribute limit of class -- trying to break the encapsulation of class, a little "against the sky" feeling.
Method 1. Add friend function
#include<iostream>
using namespace std;
class X
{
private:
int m_Age;
public:
X() : m_Age(1){}
template<typename T>
void Func(c ...
Posted by wisedj on Tue, 03 Dec 2019 22:29:32 +0100
OpenLayers displays the statistical chart, pie chart, line chart and histogram on the map, and fixes the problem of statistical chart jumping
Environment introduction
Openlayers
ol.js
v5.3.0
Highcharts
highcharts.js
v7.0.1
jquery
jquery-3.3.1.js
v3.3.1
Display effect
The enlargement and reduction of map have no effect on the size of statistical map
Take pie chart as an example
1. Add a map and render the points where the statistical map is located,
vector is th ...
Posted by thegame261 on Mon, 02 Dec 2019 17:38:39 +0100