當用戶需要在表單中輸入大段文字時,需要用到文本輸入域。
語法:
<textarea rows="行數" cols="列數">默認出現文本</textarea>
注意:
rows,cols這兩個屬性可用css樣式的width和height來代替:col用width、row用height來代替。
示例:
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>文本域</title>
</head>
<body>
<form action="save.php" method="post" >
<label><strong>個人簡介:</strong></label><br>
<textarea cols="50" rows="10">在這裏輸入內容...</textarea><br>
<input type="submit" value="確定" name="submit" />
<input type="reset" value="重置" name="reset" />
</form>
</body>
</html>
結果如圖: