Solution to the problem of secondary trigger of angular paging plug-in tm.paging
Today, I encountered a front-end problem while learning the paging plug-in of angularjs. During the debugging of Google browser developer mode, I found that each click of paging refresh button would trigger two background requests, and ajax sent two requests to the background. This is a disgusting and uncomfortable thing for obsessive-compulsiv ...
Posted by 2705ap on Sat, 15 Feb 2020 09:50:49 -0800
Fundamentals of Web development JavaScript-16
Common properties of window in JS
Case demonstration:
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>window Common attributes</title>
<script type="text/javascript">
//Hyperlink and location can realize page Jump,
//Hyperlinks are simple, but location is more f ...
Posted by tryton on Sat, 15 Feb 2020 08:55:11 -0800
Analysis of bootstrap switch control
Basic example:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name=viewport content="width=device-width, initial-scale=1">
<title>bootstrap Example of switch</title>
<link href="bt/css/bootstrap.min.css" rel="stylesheet" />
<link href ...
Posted by JChilds on Sat, 15 Feb 2020 07:17:12 -0800
JS regular expression creation, matching string, escape, character class, repetition and common characters
Regular expressions operate on strings
Function: search, replace and validate data
There are two ways to create regular expressions:
// Literal measure
/js/
// Constructor method
regular expression
new RegExp()
Common characters: alphanumeric characters blank;, @ (no special meaning symbol)
Two ways to match:
test, find and return true ...
Posted by Invincible on Sat, 15 Feb 2020 05:59:10 -0800
The realization of several handwritten codes in the front end
Preface
Now the front-end threshold is higher and higher, and it's not as simple as writing pages. Modularity, automation, cross end development and so on are gradually becoming requirements, but these need to be built on our solid foundation. No matter how the framework and model change, only by laying down the basic principles can we quickly ...
Posted by tr0gd0rr on Fri, 14 Feb 2020 23:41:40 -0800
Vue series learning notes Class and Style binding
Article directory
1. Bind HTML Class
1.1 object syntax
1.2 array syntax
1.6 for components
2. Bind inline style
2.1 object and array syntax
2.3 multiple values
1. Bind HTML Class
1.1 object syntax
We can give v-bind:class = "object" an object to achieve dynamic switching class
...
Posted by jackie111 on Fri, 14 Feb 2020 01:20:24 -0800
Two encoding formats for Post requests: application/x-www-form-urlencoded and multipart/form-data
In common business development, POST requests are often used in these places: when front-end forms are submitted, when interface code is invoked, and when the Postman test interface is used.Let's take a look:
1. When a front-end form is submitted
application/x-www-form-urlencoded
Form code:
<form action="http:// ...
Posted by buzzed_man on Thu, 13 Feb 2020 20:00:26 -0800
Click a button, if the phone has an app installed, open the app directly, otherwise jump to the application market to download the app
Recently, we are making such a function. When the front-end webpage clicks the button, if the user's mobile phone has the app installed, the app will be opened directly; otherwise, it will jump to the application market to download. The code is as follows:
<!DOCTYPE html>
<html>
<head>
<meta charset="ut ...
Posted by friendlylad on Thu, 13 Feb 2020 13:31:32 -0800
Spring MVC uses ajax to download files
Spring MVC uses ajax to download files
1, Explain the conclusion
1. ajax is unable to download files, because: ajax request is just a "character" request, that is, the content of the request is stored in a text type. The file is downloaded in binary form. Although the returned response can be read, it is only read an ...
Posted by silverphpd on Thu, 13 Feb 2020 10:05:27 -0800
Drag elements freely for free sorting
Last issue we used jquery to sort by moving elements up and down, but we found that moving up and down, while sorting is possible, is not flexible, rigid, and fast enough to achieve the purpose we want to sort.Let's show you how to quickly drag to the sort position you want.
First, we'll introduce a plug-in, gridly.js, for element dragging.
...
Posted by parse-error on Wed, 12 Feb 2020 08:55:44 -0800