How to display error message in a jsp
if(e开发者_StackOverflowmailVal == '') {
$("#email").after('<span class="error"><font color="red">Please enter your email address.</span>');
hasError = true;
}
when i use above javascript, message displays besides email textbox
<form:input path="email" id="email"/>
<c:if test="${!empty is_exist_user}">
<span class="error"><font color="red">${is_exist_user}</font></span>
</c:if>
but when i use above code in jsp file, message displays below email textbox
, how can i get this textbox besides email textbox
Either use CSS to tweak whatever is produced by whatever custom tag that is, modify the html produced by that custom tag, or don't use the custom tag.
精彩评论