页面按钮设置
来源:互联网 发布:苹果蜂窝数据dns被劫持 编辑:程序博客网 时间:2024/05/27 09:45
“保存并关闭”:保存新增信息并返回列表页面
“保存并添加”:保存新增信息并继续添加
“关闭”:退出当前新增信息页面,不保存
JSP页面:
增加按钮:
<span style="white-space:pre"></span> <span style="font-size:18px;">var dg = frameElement.lhgDG; dg.addBtn('closeBtn','关闭',closeOnClick); dg.addBtn('saveBtn','保存并关闭',saveOnClick); dg.addBtn('addBtn','保存并添加',addOnClick);</span>
//关闭按钮function closeOnClick(){var proofInfoId = $j("#proofInfoId").val();var ajaxurl ="<%=path%>/pages/business/outside/deleteProofPictureByProofInfoId.action?proofInfo.id="+proofInfoId;$j.ajax({ <span style="white-space:pre"></span>type:"GET", <span style="white-space:pre"></span>url:ajaxurl, <span style="white-space:pre"></span>datatype: "text", <span style="white-space:pre"></span>success:function(data){ <span style="white-space:pre"></span>dg.curWin.unbindunbeforunload();dg.cancel(); } }); dg.curWin.unbindunbeforunload(); dg.cancel();}function unbindbeforeunload() {dg.curWin.unbindunbeforunload();}//保存并关闭按钮 function saveOnClick(){ dg.curWin.unbindunbeforunload(); if(formcheck.onSubmit(this)){ var arr = new Array();arr[0]=document.getElementById("proofInfoId").value; //物证ID;arr[1]=document.getElementById("proofName").value; //物证名称(代码)arr[2]=arr[1];//arr[2]=getSelValue(document.getElementById("proofName")); //物证名称(中文)arr[3]=document.getElementById("proofCategory").value; //物证类别(代码)arr[4]=getSelValue(document.getElementById("proofCategory")); //物证类别(中文)arr[5]=document.getElementById("proofType").value; //物证类型(代码)arr[6]=getSelValue(document.getElementById("proofType")); //物证类型(中文)arr[7]=document.getElementById("extractMode").value; //提取方法arr[8]=document.getElementById("extractPart").value; //提取部位arr[9]=document.getElementById("saveTimeLimit").value; //保存时限(代码)arr[10]=getSelValue(document.getElementById("saveTimeLimit")); //保存时限(中文)arr[11]=document.getElementById("geometryCharacteristic").value; //几何特性(代码)arr[12]=getSelValue(document.getElementById("geometryCharacteristic")); //几何特性(中文)arr[13]=document.getElementById("proofSize").value; //尺寸arr[14] = arr[13].replace(/^0*/g, "");arr[15]=document.getElementById("mainFeature").value; //主要特征arr[16]=document.getElementById("statusDes").value; //状态描述arr[18]=document.getElementById("reserve4").value; //物证大小 17是现勘过来的图片dg.curWin.addProofTable(arr);dg.cancel(); } } // 保存并添加按钮function addOnClick(){dg.curWin.unbindunbeforunload(); if(formcheck.onSubmit(this)){ var arr = new Array();arr[0]=document.getElementById("proofInfoId").value; //物证ID;arr[1]=document.getElementById("proofName").value; //物证名称(代码)arr[2]=arr[1];//arr[2]=getSelValue(document.getElementById("proofName")); //物证名称(中文)arr[3]=document.getElementById("proofCategory").value; //物证类别(代码)arr[4]=getSelValue(document.getElementById("proofCategory")); //物证类别(中文)arr[5]=document.getElementById("proofType").value; //物证类型(代码)arr[6]=getSelValue(document.getElementById("proofType")); //物证类型(中文)arr[7]=document.getElementById("extractMode").value; //提取方法arr[8]=document.getElementById("extractPart").value; //提取部位arr[9]=document.getElementById("saveTimeLimit").value; //保存时限(代码)arr[10]=getSelValue(document.getElementById("saveTimeLimit")); //保存时限(中文)arr[11]=document.getElementById("geometryCharacteristic").value; //几何特性(代码)arr[12]=getSelValue(document.getElementById("geometryCharacteristic")); //几何特性(中文)arr[13]=document.getElementById("proofSize").value; //尺寸arr[14] = arr[13].replace(/^0*/g, "");arr[15]=document.getElementById("mainFeature").value; //主要特征arr[16]=document.getElementById("statusDes").value; //状态描述arr[18]=document.getElementById("reserve4").value; //物证大小 17是现勘过来的图片dg.curWin.addProofTable(arr);location.reload(); }}
表格代码:
<table class="form_table" width="100%" border="0" cellspacing="1" cellpadding="0"><tr class="head"><td colspan="4"> <img src="<%=path%>/images/title.gif" align="absmiddle" hspace="5">物证信息 <!-- <div style="float:right"><input id="saveBtn" type="button" value="保 存" class="button-55" onclick="addOnClick()";> <input id="cancelBtn" type="button" value="返 回" class="button-55" onclick="backOnClick()";> </div> --></td></tr><tr class="list"><td class="label" rowspan="3"><div style="padding:4px;"><img src="<%=path%>/images/must.gif"/>物证类别:</div><div style="padding:4px;"><img src="<%=path%>/images/must.gif"/>物证类型:</div><div style="padding:4px;"><img src="<%=path%>/images/must.gif"/>物证名称:</div></td><td class="content" rowspan="3"><jdf:thirdSelect name="pi.proofCategory" id="proofCategory" dictName="WZLBDM" listKey="key" listValue="value" cssClass="validate['required']" secondSelectName="pi.proofType" secondSelectLabel="" secondSelectId="proofType" secondSelectCssClass="validate['required']" ></jdf:thirdSelect><ww:textfield id="proofName" name="pi.proofName" cssStyle="width:80%" cssClass="validate['length[0,25]','required']"/></td><td class="label"><img src="<%=path%>/images/must.gif"/>保存时限:</td><td class="content"><jdf:commonDict dictName="BCQXDM" listKey="key" listValue="value" name="pi.saveTimeLimit" id="saveTimeLimit" emptyOption="true" cssStyle="width:80%" cssClass="validate['required']"></jdf:commonDict></td></tr><tr class="list"><td class="label">物证大小:</td><td class="content"><ww:textfield name="pi.proofSize" id="proofSize" cssStyle="width:80%;" cssClass="validate['length[0,100]']" /></td></tr><tr class="list"><td class="label">几何特性:</td><td class="content"><jdf:commonDict dictName="JHTXDM" listKey="key" listValue="value" name="pi.geometryCharacteristic" id="geometryCharacteristic" cssStyle="display:inline;width:80%"></jdf:commonDict></td></tr> <tr class="list"> <td class="label">物证数量:</td><td class="content" ><ww:textfield name="pi.reserve4" id="reserve4" cssClass="validate['length[0,32]']" cssStyle="width:80%;"/></td><td class="label">物证图片:</td><td class="content" ><img src="<%=path %>/images/attach.gif" onclick="addPicPath('${proofInfo.id }');" style="cursor:hand;" alt="上传照片" align="absmiddle"> <a href="#" onclick="takePhoto('${proofInfo.id}');"><img alt="拍照" src="<%=path %>/images/\icon\16x16\camera.jpg" border="0"/></a></td></tr> <tr class="list"><td class="label">提取方法:</td><td class="content"> <ww:textfield name="pi.extractMode" id="extractMode" cssStyle="width:80%" cssClass="validate['length[0,100]']"/></td><td class="label">提取部位:</td><td class="content"><ww:textfield name="pib.extractPart" id="extractPart" cssStyle="width:80%" cssClass="validate['length[0,100]']"/></td></tr><tr class="list"><td class="label">主要特征:</td><td class="content" colspan="3"><textarea rows="8" style="width:90%" name="pi.mainFeature" id="mainFeature" class="validate['length[0,1000]']"></textarea></td></tr><tr class="list"><td class="label">状态描述:</td><td class="content" colspan="3"><textarea rows="8" style="width:90%" name="pib.statusDes" id="statusDes" class="validate['length[0,1000]']"></textarea></td></tr> <tr class="list"><td class="label" height="80" width="20%">物证照片:</td><td class="content" colspan="3" width="80%"><div id="imgarea" style="margin-top:5px;margin-bottom:5px;width:95%;"></div></td></tr> </table>
实现效果:
0 0
- 页面按钮设置
- asp.net设置页面默认按钮
- JS设置页面按钮可用不可用
- Android页面中按钮OnClickListener的设置
- 设置页面按钮可用与切换
- asp.net 设置页面的默认按钮(敲回车按钮所触发的默认按钮)
- JS设置页面按钮为可用和不可用状态
- asp.net中页面按钮回车默认执行 设置方法
- 添加了母版页面设置回车键默认按钮
- Ecology7二次开发:自定义浏览按钮自定义页面设置返回值
- ASP编写一个网页界面,页面中设置按钮,按钮能够调用外部命令行程序
- 按钮设置
- 用js在页面上,设置多个按钮,点击当前按钮时,当前按钮文字变为“哈哈”,其他未点击的按钮文字变为“呜呜”。
- 页面中设置默认的回车激活按钮, ASP.NET DefaultButton 属性
- 批量设置页面上指定按钮不可用和恢复可用
- Cocos2dx3.2 Crazy Tetris 基本设置及主菜单页面(菜单、按钮)
- 在项目中,点击“删除”按钮后,跳转到哪个页面?又该如何设置?
- 页面打印按钮
- 标准Web系统的架构分层
- 深入理解数据库(DB2)缓冲池(BufferPool)
- 31. Next Permutation leetcode Python 2016 new Season
- CentOS设置服务开机启动的方法
- JAVA的StringBuffer类(与String)
- 页面按钮设置
- Android系统移植与调试之------->如何修改Android的默认语言、默认时区
- MFC添加对话框报错:enum { IDD = xxx};“xxx”: 未声明的标识符
- not()的使用
- insert into on duplicate key update与update inner join使用效果对比分析
- 皓月,幽室,静坐,轻弹纤细的筝弦
- 直接插入排序
- linux 常用基本命令之十二 which
- 树莓派杂项