JQuery implementation input upload image display thumbnail

Recently, I made a set of mobile shopping mall page, which has the function of uploading pictures to display thumbnails on the refund application page. I haven't done this before, so I sorted it out. First HTML: <p>Upload picture:</p> <div id="imgPreview"></div> <span class="upload-img">& ...

Posted by Dragoonus on Sat, 04 Apr 2020 16:58:33 -0700

The implementation of multi criteria filtering in jquery

html code: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>jquery Multi criteria filtering</title> </head> <body> <div id="wrap"> <ul class="select"> <li class="select-list"> <dl id="select1"> <dt>Jacket:</dt> <dd ...

Posted by andyg2 on Sat, 04 Apr 2020 11:46:39 -0700

Event capture and detailed explanation of event bubble

Binding of events The difference between addEventListener and event binding on addEventListener can bind multiple identical events to an element and ensure that all events will be executed Multiple events bound with on are overwritten by the last event Remove event binding: removeEventListener Event captu ...

Posted by JAM on Sat, 04 Apr 2020 11:23:47 -0700

on and off problems in jQuery

First of all, the basic scientific knowledge. On () and. Off () method is the jQuery 1.7 official release Code example 1 var $test = $(document); function handler1() { console.log( "handler1" ); $test.off( "click", handler2 ); } function handler2() { console.log( "handler2" ); } $test.on( "click", handler1 ...

Posted by matfish on Sat, 04 Apr 2020 08:37:06 -0700

Vue 2.0 monitoring text box content changes and ref instructions

<!DOCTYPE html>   <html lang="en">          <head>           <meta charset="UTF-8">           <title>Title</title>           <link rel="stylesheet" href="css/bootstrap.css">           <script src="js/jquery-3.2.1.min.js"></script>           <script src="js/bootstrap.js ...

Posted by TheMD on Sat, 04 Apr 2020 02:40:52 -0700

jquery form validation plug-in - validation form

The blogger recommended jQuery Validate before, because it was used before, but the configuration was a little bit cumbersome. Until the recent project used the validform, it opened my eyes. The whole interface suddenly felt too friendly. Let's take a few renderings first. There are very few css and j ...

Posted by chemoautotroph on Fri, 03 Apr 2020 23:15:41 -0700

The post request of Django calling external js file appears 403

Today, I found an interesting problem. The function of writing js code in html works normally, but there are various problems when js code is put into js file. 1. When using jQuery to dynamically generate tags, it is recommended to put the js file written by yourself after < / body > (otherwise, some functions m ...

Posted by Nexy on Fri, 03 Apr 2020 19:00:08 -0700

select2.js value traverse setting default value

This chapter mainly introduces the initialization of Select2, obtaining the selected value, setting the default value, and three methods. Select 2 beautifies the selection of radio boxes, check boxes and drop-down boxes, especially the problem of multiple selection of drop-down boxes. But at the same time, there are a lot of wo ...

Posted by SuNcO on Fri, 03 Apr 2020 18:57:46 -0700

daterangepicker: a dual calendar plug-in based on bootstrap

I met the requirement that I should change a double date selection format of daterangepicker to two single date selection boxes (convenient for mobile phone display). The requirements are as follows: 1. The two single date formats are start date and end date respectively 2. Start date can be selected today and after today 3. The end date is aft ...

Posted by Styles2304 on Fri, 03 Apr 2020 14:36:39 -0700

java implementation of maven project file upload SSM ajax asynchronous request upload

java ssm framework for file upload Implementation: single file upload, multi file upload (single choice and multi choice), and use ajax to asynchronously refresh, display the uploaded file in the current interface First, the configuration file of springmvc needs to configure the upload file parser: 1 <!-- Profile resolver --> 2 ...

Posted by kustomjs on Fri, 03 Apr 2020 11:21:06 -0700