Home > Web Front-end > HTML Tutorial > When html-textarea is initialized, there is a table space and the tab key operation is invalid_html/css_WEB-ITnose

When html-textarea is initialized, there is a table space and the tab key operation is invalid_html/css_WEB-ITnose

WBOY
Release: 2016-06-24 11:42:17
Original
1465 people have browsed it

1 There is a tab space during initialization

This is because The reason why the content between them is not empty includes spaces and line breaks. Otherwise, the browser will think that spaces or line breaks are the content of the text area, so when writing, need to be close together;

2 The tab key is invalid for textarea operations

When using the tab key in textarea, it is invalid and will switch to another control, but when we have a need , to be able to use the tab key in the text field, you can use javascript or jquery:

Method 1: javascript

<script>tabIndent. renderAll();</script>

class="tabIndent" in textarea tag

Example:

Test



<script>tabIndent.renderAll();</script>

Copyright statement: This article is a blog This is an original article and may not be reproduced without the permission of the blogger.

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template