Category:JavaScript

  • Ajax to achieve paging query function

    Time:2019-10-24

    Ajax page query function of the specific code, for your reference, the specific content is as follows The display results are as follows: The code to achieve the effect is as follows: 1.fenye.php <html> <head> <meta http-equiv=”Content-Type” content=”text/html; charset=utf-8″ /> <title> no title document </title> <link type=”text/css” rel=”stylesheet” href=”../bootstrap-3.3.7-dist/css/bootstrap.min.css” rel=”external nofollow” /> <script src=”../jquery-3.2.0.min.js”></script> <script […]

  • Five examples of iterative methods in javascript

    Time:2019-10-23

    Review the iterative methods in js. var arr = [1, 2, 3, 4, 5, 4, 3, 2, 1]; // all items are false, or false // otherwise until the first value is true, Return true // similar to ‘or’ in math console.log(arr.some(item, index, array) => { console.log(‘type=some,’ + ‘item=’ + item + ‘,index=’ + index […]

  • JQuery creates folding menus

    Time:2019-10-23

    Today, I’m going to show you how to create an accordion menu with jQuery, which is commonly known as the accordion (or :rdi uh). The results are as follows: 1. HTML code structure To implement the folding menu, the code is quite simple, as follows: <ul> <li> <span> Beijing attractions </span> <div> <ul> < li […]

  • About the use of ajax _ example, ajax data processing

    Time:2019-10-23

    Note that the call to the encapsulated database, and jQuery save address One, register (1) write a text box to verify the user name <input type=”text” /> <span></span> // (2) write with jQuery statement: user name can not be used, user name can be used $(“#uid”).blur(function(){   // user name   var uid = $(this).val();   // check […]

  • The implementation of processing data after AJAX is submitted to Java background

    Time:2019-10-22

    Environment: Eclipse + struts Effect to achieve:Click the button to submit the data to the background and then return to the foreground to display the data. index.jsp <%@ page language=”java” contentType=”text/html; charset=UTF-8″ pageEncoding=”UTF-8″%> <!DOCTYPE html PUBLIC “-//W3C//DTD HTML 4.01 Transitional//EN” “http://www.w3.org/TR/html4/loose.dtd”> <html> <head> <meta http-equiv=”Content-Type” content=”text/html; charset=UTF-8″> <title>Insert title here</title> </head> <body> <input type=”text”> <input […]

  • React + Ajax + java to upload pictures and Preview

    Time:2019-10-21

    Before, I used to look for Ajax to upload pictures on the Internet. Most of the people wrote in jQuery, but here, jQuery is used for big things and small things. So I wrote it myself. First, the picture above. From the above figure, first click the above selection file. After selecting the picture, it […]

  • Lodash explanation of JavaScript tool library

    Time:2019-10-21

    Preface Are you still worried about data conversion, matching, searching, etc. in JavaScript? A pile of seemingly simple foreach is tedious and uninteresting, but it still keeps repeating it! Maybe you have used underscore.js. Yes, you have made great progress. Today, however, I hope you can go further and replace underscore with lodash. Lodash started […]

  • Vue preparation before takeoff

    Time:2019-10-21

    Vue preparation before takeoff What is ECMAScript and the birth of ES6? ECMAScript 1.0 was born in 1997 ECMAScript 3.0 was born in December 1999. It is a great success and has been widely supported in the industry. It has established the basic syntax of JS and is completely inherited by later versions. Until now, […]

  • And one water has been.

    Time:2019-10-20

    First place a series of images   Then set the style, mainly the size of the picture div { position: absolute; height: 20px; width: 20px; } img { height: 100%; width: 100% } And finally, the realization of behavior. document.onmousemove = function (eve) { var e = eve || window.event; var adiv = document.getElementsByTagName(“div”); //Get […]

  • Simple implementation of JavaScript module management

    Time:2019-10-20

    1. Why does it exist? It is convenient to organize your code and improve the maintainability of the project. The maintainability of a project is not high, but also reflects the level of a programmer. In today’s more and more complex front-end projects, this is particularly important. 2. Why not use requirejs, seajs, etc. They […]

  • The implementation of angularjs tab and details of MVC case

    Time:2019-10-20

    Tab column: Code: <!DOCTYPE html> <html lang=”en”> <head> <meta charset=”UTF-8″> < title > tab tab < / Title > <style> body { margin: 0; padding: 0; background-color: #F7F7F7; } .tabs { width: 400px; margin: 30px auto; background-color: #FFF; border: 1px solid #C0DCC0; box-sizing: border-box; } img { width: 400px; } .tabs nav { height: 40px; […]

  • Iterations in JS (arrays)

    Time:2019-10-19

      What is iteration? It can be simply understood that each item in the target (array, object, etc.) can be accessed in order (in fact, it is no different from the concept of traversal). I divide the iteration of the array into two types: lookup ergodic   Search:   1.indexOf(item,start)  This method searches for the specified […]