由于某种原因,HTML textarea curson缩进

Doc*_*day 2 html jsp

我需要将光标向左对齐.由于某种原因,它在页面上呈现时缩进:

             <td>
         You have <strong><span id="commentsCounter">${const['COMMENT_MAX_LENGTH'] - fn:length(commentForm.comment)}</span></strong> characters left.<br/>
            <textarea id="comment" name="comment" rows="2" cols="125" style="width:395px;"
                 onkeypress="characterCounter('commentsCounter',${const['COMMENT_MAX_LENGTH']}, this)"
                 onkeydown="characterCounter('commentsCounter',${const['COMMENT_MAX_LENGTH']}, this)"
                 onkeyup="characterCounter('commentsCounter',${const['COMMENT_MAX_LENGTH']}, this)">
              </textarea>

                    <a href="javascript:addComment();"><img src="../images/icon_add.gif" border="0" alt="Add"/></a>
        </td>
    </tr>
Run Code Online (Sandbox Code Playgroud)

在此输入图像描述

thanx的帮助

Jam*_*ill 11

试试这个:

<textarea id="comment" name="comment" rows="2" cols="125" style="width:395px;" onkeypress="characterCounter('commentsCounter',${const['COMMENT_MAX_LENGTH']}, this)" onkeydown="characterCounter('commentsCounter',${const['COMMENT_MAX_LENGTH']}, this)" onkeyup="characterCounter('commentsCounter',${const['COMMENT_MAX_LENGTH']}, this)"></textarea>
Run Code Online (Sandbox Code Playgroud)

您的结束</textarea>标记应始终位于同一行,以避免此类问题.