![](/img/trans.png)
[英]How can I vertically align this placeholder inside an input=“text” form?
[英]How can I show an apostrophe in the placeholder text on a rails form
我想让我的表单有一个占位符,例如
请输入商店地址
如何编辑下面的表格以使撇号生效?
<%= text_area_tag 'store', '', class: 'form-control', placeholder: 'Please enter the store's address' %>
您可以使用反斜杠转义撇号:
<%= text_area_tag 'store', '', class: 'form-control', placeholder: 'Please enter the store\'s address' %>
或使用带引号的字符串文字:
<%= text_area_tag 'store', '', class: 'form-control', placeholder: "Please enter the store's address" %>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.