Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

html:text how to set placeholder attribute

Tags:

java

html

jsp

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!

like image 889
Dev01 Avatar asked Dec 31 '25 18:12

Dev01


1 Answers

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

like image 196
jmj Avatar answered Jan 02 '26 07:01

jmj



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!