How can I put a placeholder in a struts textfield tag?
html, java, javascript, jquery, struts-1
Solution
Use jQuery `attr` like below:
<html:text property="name" styleClass="form-control" styleId="abc" />
JavaScript code:
$(function() {
$("#abc").attr("placeholder", "some text");
});
Problem
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.