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

查看:95
本文介绍了为什么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天全站免登陆