jsp页面内容显隐总结

来源:互联网 发布:怎样管理海量数据 编辑:程序博客网 时间:2024/06/03 23:48

选中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>
0 0
原创粉丝点击