I have a form field in my Rails app with a placeholder. 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? Requires zero javascript and works everywhere.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.