vue learning: 10. The first project, background data management
Project construction:
1. The front end uses the Vue cli framework to realize page display
2. Middleware web service uses C ා to realize the connection between front-end and back-end database
3. Use stored procedures to put all businesses here,
Project practice
I. environment configuration
1. Install Vue cli globally and use it all the tim ...
Posted by katarra on Wed, 04 Dec 2019 15:51:59 -0800
Does jQuery have the "exist" function?
How to check the existence of elements in jQuery?
My current code is as follows:
if ($(selector).length > 0) {
// Do something
}
Is there a more elegant way to solve this problem? Maybe plug-ins or features?
#1 building
I have a situation where I want to see if one object exists in another, so I added something to the firs ...
Posted by byenary on Wed, 04 Dec 2019 11:30:15 -0800
AJAX asynchronous request
Native ajax operations
JavaScript asynchronous GET request
// Step 1: create an ajax object
//Determine the browser type of the user and decide how to use ajax objects
if (typeof ActiveXObject != "undefined") {
var version = [
'Msxml2.XMLHTTP.6.0',
'Msxml2.XMLHTTP.5.0',
'Msxml2.XMLHTTP.3.0 ...
Posted by GM on Tue, 03 Dec 2019 22:03:45 -0800
Star rating of jQuery cases
Let's take a look at the effect:Code part:html:
<body>
<ul class="comment">
<li>☆</li>
<li>☆</li>
<li>☆</li>
<li>☆</li>
<li>☆</li>
</ul>
</body>
css
<style>
* {
padding: 0;
margin: 0;
...
Posted by articlesocial on Tue, 03 Dec 2019 17:20:25 -0800
Export excel data from the front end - jsonToExcel
Keke, I haven't blogged for a long time...
In the work, we met the pure front end, and exported the data to excel file. Start of text:
The first step of installation depends on:
npm i xlsx
Step 2 write the export function:
import XLSX from 'xlsx'
const exportJsonToExcel = (dataArr) => {
const now = new Date()
const wopts ...
Posted by Atanu on Mon, 02 Dec 2019 21:08:37 -0800
bootstrap fileinput control + django background upload, echo simple use
1. Control Download: https://github.com/kartik-v/bootstrap-fileinput/
Official website: http://plugins.krajee.com/file-input
Files to be imported: 1. jquery.js
2,bootstrap.js bootstrap.css
3. The font awesome.css control icon uses font awesome, so it needs to be imported
4,finleinput.js fileinput.cs ...
Posted by amjohnno on Mon, 02 Dec 2019 12:22:35 -0800
Size, location, and page scrolling events for jQuery elements
1. Get and set the size of the element
<!doctype html><html><head><meta charset="utf-8"><title>Get size</title><script type="text/javascript" src="../jQuery library/jquery-3.3.1.min.js"></script><script type="text/javascript">
$(function(){
var $div = $('.box');
/*Box content size ...
Posted by jimjack145 on Mon, 02 Dec 2019 11:16:47 -0800
php native pull-up loading, click load more (jQuery,ajax,mysql)
Design purpose
When there is a lot of data in a website, it needs to be paged and browsed easily. In order to turn pages conveniently, we abandon the traditional Click to turn pages, pull down directly, and load data automatically constantly, so that we can read conveniently.
design principle
Through ajax to the back-end interface to initiate p ...
Posted by mr_griff on Mon, 02 Dec 2019 08:04:27 -0800
layui horizontal navigation bar Level 3
demand
A horizontal navigation bar at the top needs to be made, which has three levels. When expanding, level 2 and level 3 will expand together, as shown in the figure below:
Effect
First class menu
Two level title
Three level menu
Three level menu
Two level title
Three level menu
Three level menu
Firs ...
Posted by BryonS on Mon, 02 Dec 2019 07:40:54 -0800
Solution to select all and get value value value of the iCheck plug-in
When we use the jQuery iCheck plug-in, we encounter a problem, that is, when we use the normal js select all function, it is invalid.
$("#checkall").click(
function(){
if(this.checked){
$("input[name='checkname']").each(function(){this.checked=true;});
}else{
$("i ...
Posted by showman on Mon, 02 Dec 2019 05:49:54 -0800