Javascript implements a list that contains functions such as move up and move down and delete _ javascript skills

Source: Internet
Author: User
A project includes a list page, including functions such as "Move Up", "Move down", and "delete" in the list. For the user experience, operations were implemented using JS recently, A list page is included. operations are implemented using JS for the user experience, including moving up, moving down, deleting, and other functions in the list. AJAX is used for front-end JS and back-end data modification, this article mainly describes the front-end JS.

Take a look at

Let's take a look at its HTML structure. Of course, this is related to the front-end cut graph. The back-end program staff is only responsible for writing their own JS. I will take our project as an example and take a look at the HTML

 
 
  • Content1:2013 overtime .txt

    9:54:00

    Move up Move Down Delete

  • Content2:Usage instructions. txt

    9:54:00

    Move up Move Down Delete

  • Content3:Master account. txt

    9:54:00

    Move up Move Down Delete

  • Content4:Sorting question .txt

    9:54:00

    Move up Move Down Delete

Next, let's take a look at the JS Code, mainly implemented using the JQ on method, because the list data is static for the first time (bind). After sorting, the data changes to dynamic (live). Therefore, this structure can only be used on. Let's take a look at the code.

Related Article

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.