日期:2014-05-17  浏览次数:20608 次

textarea 右对齐,换行后产生的问题
<table>  
<tr>  
<td   valign= "middle "   align= "center ">
<br> ZHEND   <br>
<textarea   type= "text "   name= "zhend "   rows= "6 "   cols   =   "82 "   style= "text-align:   right "> AAAAAAAA
BBBBBBBB
CCCCCCCC </textarea>
</td>
</tr>  
</table>  

产生的效果类似:
AAAAAAAA
BBBBBBBB
    CCCCCCCC

为什么会这样?怎么解决?


------解决方案--------------------
你的代码中文字有换行,在文本域里面识别为一个全角空格
<textarea type= "text " name= "zhend " rows= "6 " cols = "82 " style= "text-align: right ">
AAAAAAAA
BBBBBBBB
CCCCCCCC
</textarea>

这样是你想要的效果?