2014-01-11 60 views
-1

我已經使用HTML textarea的如何防止TextArea新行?

<textarea runat="server" cols="1" rows="1" aria-expanded="false" aria-haspopup="true" ID="txt_monthlyemployee" EnableViewState="false" class="comment-tabs2" ></textarea> 

我想,當我從上textarea的編寫完成,並單擊進入textarea的不會轉到新的生產線。

回答

1

textarea基本上代表了一個multi-line純文本編輯控件。

如果你想要它在單行,那麼simple input text就足夠了。

<input type="text" /> 
+0

但它保留了舊的值如何防止 – skdeveloper