【发布时间】:2019-12-29 20:55:13
【问题描述】:
我想在我的 html 占位符中有一段格式化的代码/json。
我希望占位符的格式与我在 html 中的格式相同。
即
<textarea rows="9" data-bind="textInput: someVariable"
class="form-control"
placeholder=
'e.g.
{
"type": "service_type",
"project_id": "test-237012",
"client_email": "test@test-237012.gserviceaccount.com",
"client_id": "111390682349634407434",
....
}'>
</textarea>
如何?
【问题讨论】:
-
我检查了你的代码。它在 Firefox 中对我有用。你的占位符有什么问题?
标签: javascript html css placeholder pre