How can I put a placeholder in a struts textfield tag?
i got error because am using placeholder attribute in struts tags.... <html:text property="name" styleClass="form-control" placeholder="some text"/> how can resolve the problem,pls help me. Thanks in Advance. rajesh kakawat Use jQuery attr like below: <html:text property="name" styleClass="form-control" styleId="abc" /> JavaScript code: $(function() { $("#abc").attr("placeholder", "some text"); }); Just replace: <html:text property="name" styleClass="form-control" placeholder="some text" /> With: <input type="text" name="property" class="form-control" placeholder="some text" │ └─── Form