document.write('
解析:
<textarea name="txt1" cols="45" rows="2" onKeyDown=\'if
(this.value.length>=10){event.returnValue=false}\'></textarea