1
我都设在了Spring Web模型 - 视图 - 控制器(MVC)框架的项目。春天的Web模型 - 视图 - 控制器(MVC)架构的版本是3.2.8 我有这样一段代码在我的JSPHTML - DIV不隐藏
<div class="col-md-12" id="secondSignatoryDivId" >
<table width="100%">
<thead>
<tr>
<th><b>First name</b></th>
<th><b>Last name</b></th>
<th><b>Position</b></th>
<th><b>Title</b></th>
<th><b>Actions</b></th>
</tr>
</thead>
<tbody>
<tr>
<td><input type="text" value="${deviceForm.device.secondSignatory.firstname}" <c:if test="${readonly}">disabled="disabled"</c:if> class="form-control"/></td>
<td><input type="text" value="${deviceForm.device.secondSignatory.lastname}" <c:if test="${readonly}">disabled="disabled"</c:if> class="form-control"/></td>
<td><input type="text" value="${deviceForm.device.secondSignatory.position}" <c:if test="${readonly}">disabled="disabled"</c:if> class="form-control"/></td>
<td><input type="text" value="${deviceForm.device.secondSignatory.title}" <c:if test="${readonly}">disabled="disabled"</c:if> class="form-control"/></td>
<td>Delete</td>
</tr>
</tbody>
</table>
</div>
<c:if test="${empty applicationForm.application.secondSignatory}">
<script>
alert ('lalalal');
$('#secondSignatoryDivId').hide();
</script>
</c:if>
我看到了警报,但股利不躲!
您是否收到错误在浏览器控制台?代码 – Satpal
'没有明显的错误alert($('#secondSignatoryDivId')。length)'运行它并查看它给出1或不是。 –
似乎'$是未定义的? – Jai