<%
User user = (Authentication)session.getAttribute("Authentication");.getUser();
String loginName = user.getLoginName();
%>
<script>
<%out.println("var loginName='" + loginName + "'");%>
function changeClass(control)
{
var num = 8;
if("admin"==loginName){ //在上面定义 在这就可以用了
num++;
}
}
}
</script>