Location object of Browser in JavaScript

Summary The Location object contains information about the current URL. The Location object is part of the window object and can be accessed through the window.location property. grammar // The hash property returns the anchor part of a URL window.location.hash // The host property returns the h ...

Posted on Sat, 01 Feb 2020 23:20:07 -0800 by Jocke

Mathematical modeling model 6 - Kmeans algorithm [data type]

K-means Brief introduction of K-means algorithm Thinking of K-means algorithm Several commonly used distance calculation methods Advantages and disadvantages of KMean algorithm and applicable scenarios Advantage shortcoming Code 2D data 3D data Brief introduction of K-means algorithm K-mean ...

Posted on Sat, 01 Feb 2020 00:44:06 -0800 by bodge

Today's summary betterscroll uses the shopping page list to click and slide

Cnpm install better scroll -- save / / install import BScroll from 'better-scroll' / / call <div class="left" ref="menuWrapper"> //Write ref dom _initScroll(){ this.meunScroll=new BScroll(this.$refs.menuWrapper,{}); }, //Write events in methods this.$nextTick(()=>{ this._initScroll(); ...

Posted on Fri, 31 Jan 2020 18:49:18 -0800 by danjoe_15

9. [kowtow to Spring] - IoC's parsing < bean > tag: start the parsing process

import tag parsing is finished. Let's take a look at the parsing process of the most complex and important tag bean tag in Spring. 1. processBeanDefinition In the method ා parseDefaultElement(...), if the label is bean, the ා processBeanDefinition(Element ele, BeanDefinitionParserDelegate delegate) ...

Posted on Fri, 31 Jan 2020 13:23:42 -0800 by snuggles79

[original] brainless operation: EasyUI Tree implements left click to select only leaf node, right click to float menu to add, delete and modify

The Tree component in Easyui is frequently used, and the frequently encountered requirements are as follows: 1. In the tree structure, only leaf nodes can be selected, and other nodes cannot be selected; 2. Right click the leaf node to open the floating menu to add, delete and modify; 3. Right click the non leaf node to open the floating men ...

Posted on Fri, 31 Jan 2020 11:47:40 -0800 by jpt62089

CSS interactive picture comparison component

Usually, when we need to compare the situation of a certain place or a certain object in different periods, we usually adopt the form of picture juxtaposition or picture rotation, but such form is not direct and lacks interactivity. In order to solve this problem, we can use interactive picture control to achieve. The main idea ...

Posted on Fri, 31 Jan 2020 10:27:36 -0800 by arbitter

How to solve the problem that outline is compatible with lower version IE?

Recently, I found that the buttons in the project are basically a gif picture, which is ridiculous. The most serious problem is that if the text in the button exceeds the length of the gif picture, the excess part will not be displayed, so the operability is not very low. Of course, it's hard for a versatile programmer. Here's ...

Posted on Fri, 31 Jan 2020 09:36:29 -0800 by kendallkamikaze

Partial compatibility of native JS

1. Get the rolled out part of the page (top,left) /** * window.pageYOffset Google Firefox * document.documentElement.scrollTop ie8 * @returns {{top: (Number|number), left: (Number|number)}} */ function getScroll(){ return { scrollTop: window.pageYOffset || document.documentElement.scrollTop || document.body ...

Posted on Fri, 31 Jan 2020 07:52:23 -0800 by remnant

Generation of verification code

Related references iOS local dynamic verification code generation Basic principles 1. Store the characters, numbers and special characters to be displayed in an array. 2. Randomly get the specified number of characters from the array and drop them into the property string. 3. A certain range you set the x and y of each wo ...

Posted on Fri, 31 Jan 2020 06:05:53 -0800 by ramzess

Chinese typesetting: better Chinese copywriting

Welcome to correct. GitHub address: https://github.com/jxlwqq/chinese-typesetting Better Chinese copywriting Unify the usage of Chinese copywriting and typesetting, reduce the communication cost between team members, and enhance the quality of the website. install Use composer to install: composer require "jxlwqq/chinese-typesetting" Use Add ...

Posted on Fri, 31 Jan 2020 04:50:02 -0800 by Technex