我需要光标向左对齐。由于某种原因,它在页面上呈现时缩进了:
<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>
谢谢你的帮助
试试这个:
<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>
您的结账</textarea>
标记应始终位于同一行以避免此类问题。
我是一名优秀的程序员,十分优秀!