Why isn't my textarea's placeholder showing up?

前端 未结 1 1214
遥遥无期
遥遥无期 2020-12-04 17:39

I am using placeholders for all my form elements and it\'s showing up in them all apart from the textarea. Just looked at it in safari now, and have realised that my input

相关标签:
1条回答
  • 2020-12-04 18:14

    Because you have something as text in your textarea with a linebreak in it.

    <textarea rows="5" cols="30" placeholder="enter optional message">
            </textarea><br />
    

    Should be:

    <textarea rows="5" cols="30" placeholder="enter optional message"></textarea><br />
    
    0 讨论(0)
提交回复
热议问题