标签: html
我有一个带有"占位符"的HTML textarea包含换行符代码的属性&\#10;。它在Chrome上运行正常,但在其他浏览器上会忽略换行符。造成这种不一致的原因是什么,我该如何解决呢?
&\#10;
答案 0 :(得分:1)
Include the line break naturally with the keyboard enter? Like it is shown in this image, click to see it.
如果不起作用,请尝试通过javascript插入占位符文字? 见Insert line break inside placeholder attribute of a textarea?