網頁表單上可讓使用者輸入資料,等輸入完資料,按下按鈕就可將資料送出。文字輸入元件共有三種:單行文字框text、密碼password與多行文字框textarea。首先我們看看text與password這兩種文字輸入元件:
<html><head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <title>輸入帳號密碼 </title></head> <body><form name="form1" method="get" action="1.php" charset="utf-8"> 請輸入姓名:<input type="text" name="username" maxlength="6" size="8"><br> 請輸入密碼:<input type="password" name="passwd" maxlength="8" size="8"><br> <input type="submit"> <input type="reset"></form></body></html>
您可按下NetBeans的「Run」功能表內的「Run File」或是按鍵盤的「Shift」加上「F6」就可以進行網頁預覽,預覽完後請關閉網頁或該分頁,您就不需要開啟網頁後再輸入網址來做網頁測試。
+Read more






