<!DOCTYPE html>
<html>
<body>
<form action="/example/demo_form.aspx">
<textarea rows="4" cols="50" name="fname" required>
</textarea>
<input type="submit">
</form>
<p><b>注释:</b>Internet Explorer 和 Safari 都不支持 required 属性。</p>
</body>
</html>