JSP + AJAX add and delete multiple choice box _ Javascript tutorial

Source: Internet
Author: User
JavaScript: JSP + AJAX & nbsp; add or delete multiple selection boxes, Javascript tutorial

In this example, JSP + Ajax + text is used to demonstrate the effects of multiple select, all select, add, delete, and update checkbox multiple select boxes; fully demonstrates the use of JavaScript to control html dom and the use of XML http to transmit data, and the use of JSP to operate on text.

1. JavaScript is used to control the reality of page content and add and delete results;
2. Use JSP as the background to read, write, and update text;
3. text format is used to store data, data encoding UTF-8; 4, this example in win32, Red hat Linux 9 jdk1.5, Tomcat 5.0, Apache 2.5 debugging through, while compatible with Firefox 1.0, opera 8.0, IE6.

Advantages of this example:

1. Create an html object in real time, and add or delete the WYSIWYG page. The display speed is faster and the user experience is increased.
2. XML http transmits data only as an id or form value, saving bandwidth.
3. This example is suitable for XML http, so this effect is highly practical, but JS/JSP code is very simple.
4. There are many things that can be used in other projects and solve the problem of Chinese character encoding in operating texts. (This example runs in the Chinese operating system, so the GBK encoding is selected, if the OS is English, it needs to be processed separately, such as encoding to UTF-8, or according to the need to convert the encoding .)
5. You can drag and drop files or expand or close files. You can use cookies to record the location and enable or disable the files.
6. There are rich comments for beginners to explore together.

Disadvantages:

1. Maintenance debugging is troublesome. Is it worth doing so for this effect? If you embed an iframe in a normal way, will it work.
2. The code is not optimized or abbreviated, and sometimes redundant.
3. The interaction design is not well done. Here we mainly show the technical implementation and communication.

Source File: Click to download

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.