Computer >> 컴퓨터 >  >> 프로그램 작성 >> HTML

HTML 양식을 사용하여 이메일을 어떻게 보내나요?


HTML 양식을 사용하여 이메일을 보내려면 양식의 action 속성에 이메일 ID를 추가해야 합니다. 그 안에 mailto로 진행되는 이메일을 추가하세요. :예:mailto:emailid@example.com .

HTML 양식을 사용하여 이메일을 어떻게 보내나요?

예시

다음 코드를 실행하여 HTML 양식을 사용하여 이메일을 보낼 수 있습니다. −

<!DOCTYPE html>
<html>
   <body>
      <h2>Student Contact Form</h2>
      <form action="mailto:emailid@example.com" method="post" enctype="text/plain">
         Student Name:<br><input type="text" name="sname"> <br>
         Student Subject:<br><input type="text" name="ssubject"><br>
         <input type="submit" value="Send">
      </form>
   </body>
</html>