为什么 textarea 充满了神秘的空白? [英] Why is textarea filled with mysterious white spaces?

查看:41
本文介绍了为什么 textarea 充满了神秘的空白?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个简单的文本区域,格式如下:

I have a simple text area in a form like this:

<textarea style="width:350px; height:80px;" cols="42" rows="5" name="sitelink">
    <?php if($siteLink_val) echo $siteLink_val; ?> 
</textarea>

我一直在这个 textarea 中获得额外的空白.当我进入它时,我的光标就像在 textarea 的中间而不是在开头?什么解释?

I keep getting extra white space in this textarea. When I tab into it my cursor is like in the middle of the textarea and not in the beginning? What is the explanation?

推荐答案

仔细查看您的代码.其中,已经有三个换行符,以及 </textarea> 之前的大量空白.首先删除那些,以便标签之间不再有换行符.它可能已经成功了.

Look closely at your code. In it, there are already three line breaks, and a ton of white space before </textarea>. Remove those first so that there are no line breaks in between the tags any more. It might already do the trick.

这篇关于为什么 textarea 充满了神秘的空白?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆