JS plugin dropload pull down load data instance resolution _javascript tips

Source: Internet
Author: User

The example of this article for everyone to share the Dropload plug-in drop loading data on the specific code for your reference, the specific contents are as follows

Effect Chart:

1. Import JS

Dropload.min.js
Zepto.min.js <!--jQuery1.7 above or Zepto two choose one, do not both refer to-->

2. Background query

/** * I'm looking for the securities * * @return/@Action ("Ifindticket") public String Ifindticket () {try {futransaction transaction =
 Futransactionservice.findbyuserid (USERID);
 map<string, object> map = new hashmap<string, object> ();
 Map.put ("TransactionID", transaction = = null? 0l:transaction.getid ());
 list<fustockaccount> accounts = Fustockaccountservice.findaccountbymap (0, 5, map);
 This.getactioncontext (). Put ("accounts", accounts);
 catch (Exception e) {e.printstacktrace ();
 Logger.equals (e);
 return SUCCESS; /** * I'm looking for the stock data * * @return/@Action ("Findticketdata") public String Findticketdata () {try {futransaction tr
 Ansaction = Futransactionservice.findbyuserid (userId);
 map<string, object> map = new hashmap<string, object> ();
 Map.put ("TransactionID", transaction = = null? 0l:transaction.getid ());
 list<fustockaccount> accounts = fustockaccountservice.findaccountbymap (0, Integer.max_value, map); Jsonobject json = new JSONOBJECT ();
 Jsonarray array = new Jsonarray ();
  if (accounts.size () > 0) {for (Fustockaccount account:accounts) {Jsonobject obj = new Jsonobject ();
  Obj.put ("id", Account.getid ());
  Obj.put ("Openequity", account.getopenequity ());
  Obj.put ("Capitalaccount", Account.getcapitalaccount ());
  Obj.put ("Transactionstatus", Account.gettransactionstatus ()); Obj.put ("Status", account.gettransactionstatus () = 0?
  "Operating": "The stock has been retired"); Obj.put ("Available", New DecimalFormat ("#,###,# #0."). Format (account.getavailable () = NULL 0:
  Account.getavailable ())); Obj.put ("Ablemoney", New DecimalFormat ("#,###,# #0."). Format (Account.getablemoney () = NULL 0:
  Account.getablemoney ())); Obj.put ("Createtime", New SimpleDateFormat ("yyyy").
  Mm.dd "). Format (Account.getcreatetime ());
 Array.add (obj);
 } json.put ("array", array);
 Write (json.tostring ());
 catch (Exception e) {e.printstacktrace ();
 Logger.error (e);
 return null;
 }

3. Use of page Plug-ins

 <! DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 transitional//en" "Http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd ">  

  above is the entire content of this article, I hope to help you learn, but also hope that we support the cloud-dwelling community.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.