html如下:
<tr id="isShow">
<td align="right">
<label class="Validform_label">
论文指导费缴费状态:
</label>
</td>
<td class="value">
<input id="thesisGuideFee" name="topic" type="text" maxlength="12" style="width: 80%" class="inputxt" ignore="ignore" value='${ttmThesisScorePage.thesisGuideFee == 6 ?"无需缴费":"待缴费"}'/>
<span class="Validform_checktip"></span>
<label class="Validform_label" style="display: none;">论文指导费缴费状态</label>
</td>
<td align="right">
<label class="Validform_label">
</label>
</td>
<td class="value">
<span class="Validform_checktip"></span>
</td>
</tr>
js代码如下:页面一开始加载就判断
<script type="text/javascript">
//判断是否显示待缴费框
$(window).load(function(){
//获取input框的值
var value = $("#thesisGuideFee").val();
//判断
if ("无需缴费" === value) {
//隐藏
$("#isShow").hide();
}else {
//显示
$("#isShow").show();
}
console.log("value=",value);
});
</script >