Dev01
Dev01

Reputation: 14159

html:text how to set placeholder attribute

I mostly do HTML/CSS/JS so i'm kind'a lost here, so no idea if this is possible the way i want it anyway, this is it:

I have this code

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

I want this input to render with the attribute "placeholder". How can i go about this?

Thanks in advance!

Upvotes: 3

Views: 7631

Answers (1)

Jigar Joshi
Jigar Joshi

Reputation: 240928

If struts doesn't provide then you could inject it using jQuery if you need it

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

you can supply id using styleId attribute of struts's tag

Upvotes: 4

Related Questions