JavaScript cast
Since I haven't learned any other programming languages, as my first programming "native language", I won't give examples of other programming languages here. JavaScript, as a variable of dynamic type scripting language, has no type, so how can we convert its variables? And forced conversion.
JavaScript variables really have no type. ...
Posted by litarena on Mon, 09 Dec 2019 12:10:09 +0100
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
The front end modifies the size of the input uploaded image
My intention is to compress the quality of the picture, and accidentally write it to modify the width and height of the picture;
1. HTML code:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<met ...
Posted by Cless on Fri, 06 Dec 2019 17:18:54 +0100
Two schemes for users to customize the theme color of a project
Preface
You should have seen many websites that can change the theme or theme color. If you want to change the built-in scheme, you can directly replace the css file, we won't talk about it. This article introduces a simple scheme of user-defined theme color replacement!
1. Relevant knowledge points
1.1 CSSStyleSheet.insertRule()
CSSStyleSheet ...
Posted by Black Rider on Tue, 03 Dec 2019 16:36:48 +0100
js format xml and highlight keywords
w3school XML DOM - DOMParser object
DOM parser parses XML tags to create a document.
Constructor
new DOMParser()
The domparser object parses the XML text and returns an XML Document object. To use DOMParser, instantiate it with a constructor without arguments, then call its parseFromString() method:
var doc = (new DOMParser()).parseFromString( ...
Posted by bluegray on Tue, 03 Dec 2019 10:33:22 +0100
PHP verification user name re registration [novice]
This summary uses the simplest way to verify whether the form submission (user name) exists in the data table through PHP. If it exists, it shows that it has been registered. If it does not exist, it can be registered normally.
The detailed code is as follows:
Steps omit the establishment of database and data table.
The front-end submission pag ...
Posted by maxime on Mon, 02 Dec 2019 18:12:07 +0100
Application of axios in vue.js
introduce
Axios is a promise based HTTP library that can be used in browsers and node.js. It is also the library recommended by the author of vue.js
Realization function
Create from browser XMLHttpRequests
Create from node.js http request
Support Promise API
Intercept requests and responses
Transform request data and response dat ...
Posted by vocoder on Mon, 02 Dec 2019 01:39:05 +0100
Solutions to download APP directly in wechat (including apk and ios)
More and more promoters and operators choose to use wechat for promotion, or to obtain more customer resources through wechat, APP promotion is no exception. Due to the saturation of the app market, there are strict auditing standards in the app market, and there is a lot of human and material resources wasted. As wechat now downloads, the tra ...
Posted by lorri on Sun, 01 Dec 2019 22:24:00 +0100
Drag and drop sorting of AngularJS (ngDraggable.js)
ngDraggable.js is a relatively simple and practical angularJS drag plug-in. With some encapsulated custom instructions, it can quickly carry out some drag application development. First, some basic concepts are introduced;
Ng drop: whether drag elements are allowed
Ng drop success ($data, $event): drag the callback put in by the element; $ ...
Posted by DJ_CARO on Sat, 30 Nov 2019 06:15:46 +0100
C51: infrared communication control steering gear rotation
Preface
I don't know what to say. I bought STM32, and opencv is finally useful.
PPM and PWM
For example, to modulate the length of ton {on} ton, keep the tofft {off} toff unchanged.
PWM, pulse width modulation. For example, the modulation duty cycle is t on t \ frac {t {on} {t} {tton}, but the period is not changed.
The re ...
Posted by qt4u on Thu, 14 Nov 2019 20:39:25 +0100