解決頁面<textarea>初始焦點顯示位置不正確的問題

來源:互聯網
上載者:User

標籤:

在開發過程中,遇到了下面的問題

問題:我們在jsp頁面定義好一個textarea之後,當我們初始化進入頁面的時候,發現textarea焦點顯示的位置前面會有一定的空格,雖然這個不影響什麼,但是總是感覺不舒服,經過一番折騰,終於找到瞭解決辦法,如下:

首先是:造成存在空格的寫法:

            <td class="tdL" colspan="3">                <textarea name="workLoad"   style="width: 641px; height: 70px; max-width: 641px; max-height: 70px;">                </textarea>            </td>

 正確的沒有空格的寫法:

            <td class="tdL" colspan="3">                <textarea name="workLoad"   style="width: 641px; height: 70px; max-width: 641px; max-height: 70px;"></textarea>            </td>

總結:上面兩個寫法的區別就是<textarea>是否寫在一行的區別,希望可以幫到!

解決頁面<textarea>初始焦點顯示位置不正確的問題

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.