DONT ADD ANYTHING HERE!

  1. The textarea element represents a multi-line plain-text editing control, useful when you want to allow users to enter a sizeable amount of free-form text, for example a comment on a review or feedback form
  2. An id attribute allows the textarea to be associated with a label element
  3. A name attribute sets the name of the associated data submitted to the server
  4. rows
    1. The number of visible text lines for the control
    2. If it is specified, it must be a positive integer
    3. If it is not specified, the default value is 2
  5. cols
    1. The visible width of the text control, in average character widths
    2. If it is specified, it must be a positive integer
    3. If it is not specified, the default value is 20
  6. Default content is entered between the opening and closing tags
  7. textarea does not support the value attribute
  8. The textarea tag is an escapable raw text (type 4) HTML element (title is another)
  9. Escapable raw text elements can have text and character references (HTML entities)
  10. The textarea element also accepts several attributes common to form input elements, such as
    1. autocapitalize
    2. autocomplete
    3. autofocus
    4. disabled
    5. placeholder
    6. readonly
    7. required

Example

HTML

<label for="story">Tell us your story:</label>

<form id="form_one">

    <textarea 
        id="story" 
        name="param1" 
        rows="5" 
        cols="33" 
        maxlength="200">

            It was a dark and stormy night...

    </textarea>

</form>

Browser

JavaScript
async function sendData() {

    const formData = new FormData(form_one);

    try {
        const response = await fetch("https://php.tomgdow.com", {
            method: "POST",
            body: formData
        });

        let result = await response.text();
        console.log(result);
        let responseArray = result.split('&');
        document.getElementById('myoutput').value = responseArray[0];

    } catch (e) {
        console.error(e);
    }
}

document.getElementById('form_one').addEventListener('submit', function (event) {

    event.preventDefault();

    sendData();


});
                            

References