JSP failed to submit solution for content in Nicedit _jsp programming

Source: Internet
Author: User

In Google's process to see this article ("Nicedit in jquery can not get the textarea value") to get an inspiration, that is, you can read out the Nicedit Rich Text editor with JS content, assign its contents to textarea, and then submit the form. The code is:

Copy Code code as follows:

<textarea name= "Intro" rows= "cols=" "id=" Introcontent "style=" width:750px; height:300px; border:1px solid #000; " >${sightInfo.introduction}</textarea>
<input type= "button" value= "commits" onclick= "$ (' #introContent '). Val ($ ('. Nicedit-main '). html ()), $ (' form '). Submit (); />

$ (' #introContent '). Val ($ ('. Nicedit-main '). html ());

This code can ensure that the contents of the Nicedit are assigned to the TEXTAREA element before the form is submitted. This will not be empty if the value of "Intro" is read in the servlet.

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.