Home > Article > Web Front-end > jquery constructor modifies data during form submission_jquery
Post the code first
<script type="text/javascript"> function appendText(){ var content = $("#textarea").val(); var new_content = content + "wap"; $("#textarea").attr("value",new_content); }; </script>
Then when submitting the form
<form onsubmit="appendText();" >
Then check the data beauty in the background, and the corresponding characters will be added accordingly
The above is the entire content of this article, I hope you all like it.