本文主要是介绍jsp页面内容显隐总结,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
选中grid某条记录按钮显隐
< open:grid property ="record" caption ="查询结果" width ="100%" keylist ="zhuanjia_id" nowrap ="true" navbar ="top" fixrow ="true" sortColumn ="*" onselect ="func_grid_select()">
function func_grid_select(){var shenhezt=getFormFieldValues("record:shenhezt" );var shenhejg=getFormFieldValues("record:shenhejg" );if((shenhezt!="02" &&shenhejg!="01") || (shenhezt!="03" &&shenhejg!="01")){$( "input[name='select-key:zhuanru']" ).attr("disabled", true);$( "input[name='select-key:zhuanjiash']" ).attr("disabled", false);return;}else{$( "input[name='select-key:zhuanru']" ).attr("disabled", false);$( "input[name='select-key:zhuanjiash']" ).attr("disabled", true);return;}
}
控制按钮显隐
$("#btn_submit").attr( "disabled" ,true);//控制按钮显隐
控制页面中某些内容显隐
var processDefinitionKey = getFormFieldValue("task-record:processDefinitionKey");
if(processDefinitionKey!=''){document.getElementById("spjl").style.display = "";
}else{document.getElementById("spjl").style.display = "none";
}<div id="spjl" style="display: none;"><div class="form-title" ><img src="<%= titleImagePath %>/i-note-dbcheck.png"/>记录</div><div class="form-body"><open:grid property="history-record" caption="流程任务" keylist="tian_spxx_id" sortColumn="tianbh" width="100%;" style="" ><open:cell property="tianbh" caption="编号" style="width:7%" /> <open:cell property="name" caption="名称" style="width:8%" /><open:cell property="starttime" caption="开始时间" style="width:6%" /><open:cell property="createtime" caption="创建时间" style="width:6%"/><open:cell property="zhixingr" caption="执行人" style="width:7%" valueset="COMMON_YHLIST"/><open:cell property="shenpijl" caption="结论" style="width:5%" valueset="#8=同意;7=不同意;2=审批通过;4=不通过;3=提案修改"/><open:cell property="shenpiyj" caption="意见" style="width:15%"/></open:grid></div>
</div>
控制table某几行显示以及按钮内容变化
var isGaojicx=true;//高级查询//更多查询条件function func_more(){// 高级查询if(isGaojicx){$(".ycang").show();$('input[name=more]').val("默认条件");}// 简单查询else{$(".ycang").hide();$('input[name=more]').val("更多条件");}isGaojicx=!isGaojicx;
}<input type="button" name="more" class="btn btn-primary" value="更多条件" onclick="func_more()"/><tr class="ycang"><th width="10%">名称</th><td width="40%"><open:text property="famingmc" caption="名称" style="width:314px;" /></td><th width="10%">类型</th><td width="40%"><open:checkbox property="zhuanlilx" valueset="类型" /></td>
</tr>
这篇关于jsp页面内容显隐总结的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!