相关疑难解决方法(0)

在textarea的占位符属性中插入换行符?

我尝试了一些方法但没有工作.有没有人知道解决这个问题的好方法?

<textarea placeholder='This is a line \n this should be a new line'></textarea>

<textarea placeholder='This is a line     
should this be a new line?'></textarea> <!-- this works in chrome apparently -->
Run Code Online (Sandbox Code Playgroud)

更新:它不适用于chrome.这只是textarea的宽度.

请参阅: http ://jsfiddle.net/pdXRx/

html

159
推荐指数
14
解决办法
13万
查看次数

标签 统计

html ×1