-1

I need to write a longer hint in Placeholder html5. But It's only allows My to write 15 16 character. I tried input type="text" placeholder="and here i need to write something a little bit longer but it just doesn't allow me" I searched in Google but wasn't helpful.

Mo NA
  • 1
  • 2

1 Answers1

1

You can take a look to this code:

// HTML
<input placeholder="Please enter your name, address and shoe size">

// Javascript
input.setAttribute('size',input.getAttribute('placeholder').length);

I got the answer from this link How to set an input width to match the placeholder text width, if you want the details you can check the link, thank you