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>
  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值