jquery的hide()方法,隐藏父容器,子元素也被隐藏的原因
如下代码,点击修改按钮时,修改按钮也一起隐藏掉了;后来将style="display:block" border="0" cellspacing="0" cellpadding="0"> <tr> <td colspan="4" align="center" valign="top"> <div ><a href="javascript:void(0);" onclick="$('#box6').hide(); $('#box66').show()" ><em style="display:none" modelAttribute="enrStudentEpitaxyInfo" action="${ctx }/student/enrStudentEpitaxyInfo/saveJttx" method="post"> <input type="hidden" value="${enrStudentEpitaxyInfo.fid }" name="fid" /> <input type="hidden" value="${fid }" name="enrStudentInfo.fid" /> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td colspan="4" align="center" valign="top"> <div > <a title="保存" href="javascript:void(0);" onclick="submitAjaxForm('jttx'); " ><em href="javascript:void(0);" onclick="$('#box66').hide(); $('#box6').show()" ><em name="fhomeAddress" value="${enrStudentEpitaxyInfo.fhomeAddress}"/> </td> <td width="25%" name="fzipCode" value="${enrStudentEpitaxyInfo.fzipCode}"/> </td> </tr> <tr> <td name="fhomePhone" value="${enrStudentEpitaxyInfo.fhomePhone}"/> </td> <td name="fhomeEmail" value="${enrStudentEpitaxyInfo.fhomeEmail}"/> </td> </tr> </table> </form:form> </div>