Struts2里,为啥我用div设置style="display: none;"无效?
<%@pagelanguage="java"import="java.util.*"pageEncoding="utf8"%><%@taglibprefix="s"uri...
<%@ page language="java" import="java.util.*" pageEncoding="utf8"%>
<%@ taglib prefix="s" uri="/struts-tags" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Register</title>
</head>
<script src="js/common.js"></script>
<body>
<center>
<strong><s:text name="gmRegister"/></strong>
<s:property value="exception.message"/>
<s:form action="register" method="post">
<s:textfield key="gmEmail" name="user.email" maxlength="50" cssStyle="width:200px;"></s:textfield>
<s:password key="gmPassword" name="user.password" maxlength="16" cssStyle="width:200px;"></s:password>
<s:textfield key="gmNickname" name="user.nickname" maxlength="50" cssStyle="width:200px;"></s:textfield>
<div style="display: none;" id="advselect">
<strong><s:text name="gmRegister"/></strong>
<s:textfield key="gmFirstName" name="user.firstName" maxlength="50" cssStyle="width:200px;"></s:textfield>
<s:textfield key="gmSecondName" name="user.secondName" maxlength="50" cssStyle="width:200px;"></s:textfield>
<s:select key="gmGender" name="user.gender" list="#{0:getText('gmUnknow'),1:getText('gmMale'),2:getText('gmFemale')}" listKey="key" listValue="value" />
<s:textfield key="gmMajor" name="user.major" maxlength="50" cssStyle="width:200px;"></s:textfield>
<s:textfield key="gmSecondEmail" name="user.secondEmail" maxlength="50" cssStyle="width:200px;"></s:textfield>
<s:textarea key="gmBiographical" name="user.biographical" cssStyle="width:300px;height:200px;"></s:textarea>
</div>
<s:hidden key="gmPermission" name="user.permission" value="1"></s:hidden>
<s:submit key="gmRegister"></s:submit>
</s:form>
</center>
</body>
</html>
其中div里设置了隐藏,但是结果是只有<strong></strong>中的文字被隐藏了,struts的标签都没有被隐藏,为啥啊? 展开
<%@ taglib prefix="s" uri="/struts-tags" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Register</title>
</head>
<script src="js/common.js"></script>
<body>
<center>
<strong><s:text name="gmRegister"/></strong>
<s:property value="exception.message"/>
<s:form action="register" method="post">
<s:textfield key="gmEmail" name="user.email" maxlength="50" cssStyle="width:200px;"></s:textfield>
<s:password key="gmPassword" name="user.password" maxlength="16" cssStyle="width:200px;"></s:password>
<s:textfield key="gmNickname" name="user.nickname" maxlength="50" cssStyle="width:200px;"></s:textfield>
<div style="display: none;" id="advselect">
<strong><s:text name="gmRegister"/></strong>
<s:textfield key="gmFirstName" name="user.firstName" maxlength="50" cssStyle="width:200px;"></s:textfield>
<s:textfield key="gmSecondName" name="user.secondName" maxlength="50" cssStyle="width:200px;"></s:textfield>
<s:select key="gmGender" name="user.gender" list="#{0:getText('gmUnknow'),1:getText('gmMale'),2:getText('gmFemale')}" listKey="key" listValue="value" />
<s:textfield key="gmMajor" name="user.major" maxlength="50" cssStyle="width:200px;"></s:textfield>
<s:textfield key="gmSecondEmail" name="user.secondEmail" maxlength="50" cssStyle="width:200px;"></s:textfield>
<s:textarea key="gmBiographical" name="user.biographical" cssStyle="width:300px;height:200px;"></s:textarea>
</div>
<s:hidden key="gmPermission" name="user.permission" value="1"></s:hidden>
<s:submit key="gmRegister"></s:submit>
</s:form>
</center>
</body>
</html>
其中div里设置了隐藏,但是结果是只有<strong></strong>中的文字被隐藏了,struts的标签都没有被隐藏,为啥啊? 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询