主要是用于获取焦点,自动把光标放到此组件上面,无须用户再次操作。
示例:
<html> <head> <p>1. 长度限制</p> <form name=a onsubmit="return test()"> <textarea name="b" cols="40" rows="6" placeholder="不能超过50个字符!"></textarea> <br /> <input type="submit" name="Submit" value="check"> </form> <script language="javascript"> <h