2021年4月27日星期二

Add upload attachment name into textarea before submit

Any method i can add the filename into textarea before the user submit the form?

Is it possible to do it by php / javascript? Thank you.

    <form id="Apply" name="Apply" method="post" enctype="multipart/form-data" action="applyLeave.php">      <p><select name="txtLeaveType" id="txtLeaveType">      <option value="">--Select--</option>      <option value="1" selected="selected">AL</option>      <option value="2">SL</option>      </select></p>        <p><textarea rows="3" cols="30" name="txtComment" id="txtComment" class="valid"></textarea></p>      <p>Select image to upload: <input type="file" name="fileToUpload" id="fileToUpload"></p>      <p><input type="submit" value="Submit" name="submit"></p>
https://stackoverflow.com/questions/67293432/add-upload-attachment-name-into-textarea-before-submit April 28, 2021 at 11:38AM

没有评论:

发表评论