React ----- learning notes ----- using JSX to describe UI information (3)
Modify the contents of src/index.js:
import React, {Component} from 'react'
import ReactDOM from 'react-dom'
import './index.css'
class Header extends Component{
render () {
return (
<div>
<h1>my-react</h1>
</div>
)
}
}
ReactDOM.render(
...
Posted by amycrystal123 on Wed, 08 Jan 2020 08:20:07 -0800
Is there a way to detect if the browser window is currently inactive?
My JavaScript is active on a regular basis. When the user does not view the site (that is, the window or tab does not have focus), it is best not to run.
Is there a way to do this with JavaScript?
My reference point: if the window you are using is not activated, Gmail chat will play sound.
#1 building
Since the initial writing of t ...
Posted by Shifty Geezer on Wed, 08 Jan 2020 07:22:31 -0800
How to force the client to refresh JavaScript files?
We're currently working in a private beta, so we're still making fairly rapid changes, although obviously we'll slow down the process as usage increases. That said, one of the problems we encountered was that after the introduction of the new JavaScript file update, the client browser still uses the cached version of the file, and they can't s ...
Posted by shashiku on Wed, 08 Jan 2020 02:53:41 -0800
ES6 class (basic syntax + method)
Static properties and static methods
1. The properties and methods that are not owned by the class instance are owned by the class itself2. Can only be called by class
Static method has the same name as normal method, no conflictStatic keyword (static method)
Static attributeClass name. Attribute name = attribute value;
Static attribute appl ...
Posted by paulareno on Tue, 07 Jan 2020 07:57:00 -0800
One click copy paste
One click Copy and paste requires a lightweight JS plug-in: clipboard.js.
Official website address: https://clipboardjs.com
After downloading to the local, put it into the project and directly reference it. The specific implementation code is as follows:
<!DOCTYPE html>
<html>
<head>
<meta charse ...
Posted by proiek on Tue, 07 Jan 2020 07:52:33 -0800
android and h5 interaction
Modern mobile applications are almost both native and h5 mixed open, which not only ensures the user experience, but also enables the app to have the ability of dynamic update to a certain extent. At the same time, it is conducive to cross platform development and reduce human costs. The interaction between app and h5 can't ...
Posted by asgerhallas on Tue, 07 Jan 2020 03:10:33 -0800
Simple implementation of JS forbidding to view web source code
In project development, we sometimes encounter the source code information of the website that we don't want others to easily view. We have many ways to lightly protect our own website source code. Here are three ways to use JavaScript to protect your website source code:
The most common way to check the source code of a websit ...
Posted by 9999 on Tue, 07 Jan 2020 02:29:30 -0800
Using "esri/tasks/IdentifyTask" to query multiple layers and display multiple attribute pop ups
Before, just click the layer to display the attribute pop-up window of the layer
However, sometimes it is necessary to query multiple layers and display all the corresponding attribute pop-up windows. At this time, map.infoWindow attribute is needed to implement this
1, Lead in module
["esri/map",
"esri/layers/ArcGISDynamicM ...
Posted by Ammar on Mon, 06 Jan 2020 17:59:28 -0800
react realizes the function of website skin changing
I. objectives
Several theme colors are provided for users to choose, and then the theme color of the application is changed according to the user's choice;
2, Implementation principle
1. Prepare style files of different theme colors;
2. Record the user's selection in the local cache;
3. When entering the application, read the cache, and judge ...
Posted by webdes03 on Mon, 06 Jan 2020 11:53:12 -0800
Componentized Development of Vue Family Buckets
Author| Jeskson
Excavation| https://juejin.im/user/5a16e1f3f265da43128096cb
To learn component development, first master the idea of component development, the way components are registered, the data interaction between components, the use of component slots, the use of vue mode tools, and the way components implement business logic functions ...
Posted by cristalmolix on Mon, 06 Jan 2020 11:24:55 -0800