2011-09-27 71 views
0
if(emailVal == '') { 
       $("#email").after('<span class="error"><font color="red">Please enter your email address.</span>'); 
       hasError = true; 
      } 

当我上面的JavaScript中使用显示错误消息,消息显示,除了email textbox如何在JSP

<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> 

,但是当我在上面的JSP文件中的代码,消息显示下email textbox,用我怎样才能得到此文本框除email textbox

+0

哇,''。这个元素自1998年HTML4以来就被弃用了。为什么你不在''''中使用的CSS'.error'类中声明'color:red;'? – BalusC

回答

0

要么使用CSS来调整由任何自定义标记产生的内容,即修改该自定义标记生成的html,或者不使用自定义标记。

+0

你在说哪个自定义标签 – Romi

+0

@Romi ...你的代码段中唯一的自定义标签,“”。 –

+0

这不完全是自定义标签。这被认为是一个Spring MVC标签。 – BalusC