Html: text how to set placeholder attribute

I mainly do HTML / CSS / JS, so I just lost it here, so I don’t know if this is possible the way I want it, this is it:

I have this code

<html:text styleClass="span4" title="No spaces or dashes" />

I want this input to display with the "placeholder" attribute. How can i do this?

Thanks in advance!

+3
source share
1 answer

If struts does not provide, you can enter it using jQuery if you need it

$("#idOfInputText").attr('placeholder', 'some text')

you can specify id using styleIdstruts tag attribute

+4
source

All Articles