[英]Separate placeholder text in form's input field with input string in the middle
I have a form field in my Rails app with a placeholder. 我的Rails应用程序中有一个带有占位符的表单字段。 I'd like to divide the placeholder when you focus on the form so that the actual input of the form sits in between it. 当您专注于表单时,我想分割占位符,以便表单的实际输入位于它之间。 So for example the placeholder would be like: 所以例如占位符就像:
Placeholder "input string" placeholder
I'd like to fashion the field so that: 我想塑造这个领域,以便:
Is that possible? 那可能吗?
Have you considered something like: 你考虑过这样的事情:
<label for="foo">Placeholder
<input id="foo" name="foo" value="input string"> placeholder</label>
combined with CSS to make the input flow with the surrounding text? 结合CSS使输入流与周围的文本? Requires zero javascript and works everywhere. 需要零javascript并且无处不在。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.