源代碼
點擊運行
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>教程</title> </head> <body> <form id="frm1" enctype="text/plain"> 第一個名字: <input type="text" name="fname" value="Donald"><br> 第二個名字: <input type="text" name="lname" value="Duck"><br> </form> <p>表單數據將被編碼為: <script> document.write(document.getElementById("frm1").enctype); </script> </p> </body> </html>
運行結果