工作之需
来源:互联网 发布:网络推广和运营 编辑:程序博客网 时间:2024/04/29 20:27
日期类:
<input class="Wdate" type="text" id="csrq" name="csrq" width="200px" required="true"onfocus="WdatePicker({skin:'whyGreen',dateFmt:'yyyy-MM-dd HH:mm:ss'})" class="Wdate" style="width: 140px;" value="${object.csrq }"/>
<input class="Wdate" type="text" id="csrq" name="csrq" width="200px" required="true" onfocus="WdatePicker({skin:'whyGreen',dateFmt:'yyyy-MM-dd HH:mm:ss'})" class="Wdate" style="width: 140px;"
value="<fmt:formatDate value="${object.csrq }" type="both" pattern="yyyy-MM-dd HH:mm:ss"/>" />
照片上传:
<script type="text/javascript">function getContextPath(){return "<%=request.getContextPath()%>";}function add_win() { Ext.QuickTips.init(); var msg = function(title, msg) { Ext.Msg.show({ title: title, msg: msg, minWidth: 300, modal: true, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK }); }; var add_winForm = new Ext.FormPanel({ fileUpload: true, width: 500, frame: true, autoHeight: true, bodyStyle: 'padding: 10px 10px 0 10px;', labelWidth: 70, defaults: { anchor: '95%', allowBlank: false, msgTarget: 'side' }, items: [{ xtype: 'fileuploadfield', emptyText: '请选择需要上传的文件', fieldLabel: '文件路径', name: 'file', buttonText: '', buttonCfg: { iconCls: 'upload-icon' }}], buttons: [{ text: '上传', handler: function() { if (add_winForm.getForm().isValid()) { add_winForm.getForm().submit({ url: '<%=basePath%>photoupfile.do', waitMsg: '正在上传文件,请稍后...', success: function(add_winForm, o) { var flag = o.result.success+""; if(flag == 'true'){ var filename = o.result.filename; /*上传完后显示图片*/ $("#tupian").append("<input value="+filename+" id=reservation02 name=reservation02 type=hidden />" ); $("#photo").append("<img id=zhaopian src=<%=basePath%>/fwqz/photo/"+filename+" width=100% height=100% />" ); msg('导入成功', o.result.fjmc); syswin.hide(); } if(flag == 'false'){ msg('导入失败', o.result.files); syswin.hide(); } } }); } } }, { text: '重置', handler: function() { add_winForm.getForm().reset(); }}] }); var syswin = new Ext.Window({ title: "文件上传", width: 538, height: 135, plain: true, resizable: false, collapsible: true, closeAction: 'close', closable: true, modal: 'true', buttonAlign: "center", bodyStyle: "padding:10px 0 0 10px", items: [add_winForm] }); syswin.show(); } $(function(){ $("#upload").click(function(){ var iscunzai = $("#zhaopian"); alert(iscunzai); if(iscunzai != null){iscunzai.remove();} add_win(); }); });</script>
<td class="edit_table_td_title td_right" rowspan="9">人员照片</td><td class="edit_table_td_title td_right" id="tupian" rowspan="9" style="width:200px; height:180px;"><div class="photot" id="photo" style="width:180px; height:160px;align:right"><c:if test="${not empty object.reservation02 }"> <img id="zhaopian" src="<%=basePath%>/fwqz/photo/${object.reservation02 }" width="100%" height="100%" /></c:if></div><input type="button" id="upload" value="上传图片"></td>
代码生成工具:
package tests;import org.junit.Test;public class CreateUtils {@Testpublic void testname() throws Exception {String string11 = "jbr = request.getParameter('jbr') == null ? '' : request.getParameter('jbr')";String [] arrStrings = {"STCD","YZTZ","TSTZ","TBFW","TBBW","TSBJ","SL","SSWP","SWYY","CFD","STWZCD","STFBCD","CLQK"};for (int i = 0; i < arrStrings.length; i++) {String str = arrStrings[i].toLowerCase().trim();String string = string11.replace("jbr", str);//string = string.replace(" ", "");string = string.replace("'", "\"");System.err.print("String ");System.err.print(string);System.err.print(";");System.err.println();}}@Testpublic void name() {String string1 = "<td class='edit_table_td_title td_right'>";String string2 ="</td>"; String string3 ="<td class='edit_table_td_title td_left'>";String string4 ="<input class='button_input' type='text' id='shdw' name='shdw' value='${object.shdw}'/>";String [] string5 = { "尸体长度 ","衣着特征 ","特殊特征 ","体表方位 ","体表部位 ","特殊标记 ","数量 ","随身物品 ","死亡原因 ","存放地 ","尸体完整程度","尸体腐败程度","处理情况 "};String [] arrStrings = {"STCD","YZTZ","TSTZ","TBFW","TBBW","TSBJ","SL ","SSWP","SWYY","CFD ","STWZCD","STFBCD","CLQK"};for (int i = 0; i < string5.length; i++) {String str = string5[i];str = str.replace(" ", "");String strrw = arrStrings[i].toLowerCase();String string = string4.replace("shdw", strrw.trim());string = string.replace("'", "\"");System.err.println(string1.replace("'", "\""));System.err.println(str);System.err.println(string2);System.err.println(string3.replace("'", "\"").trim());System.err.println(string);System.err.println(string2);}}}
新增修改删除:
<script type="text/javascript">
function xz(){ window.open("<%=basePath%>tzggxx/CREATE_TZGGXX.jsp","_self");}function list(){var obj = document.getElementsByName("systemid"); for(i=0;i<obj.length;i++){ if(obj[i].checked){ window.open("<%=basePath%>listTHbyjTzggxx.do?systemid="+obj[i].value,"_self"); return true; } } alert("请选择一条记录!"); return false;}function edit(){var obj = document.getElementsByName("systemid"); for(i=0;i<obj.length;i++){ if(obj[i].checked){ window.open("<%=basePath%>listTHbyjTzggxx.do?systemid="+obj[i].value,"_self"); return true; } } alert("请选择一条记录!"); return false;}function sc(){var obj = document.getElementsByName("systemid"); var flag=true; for(i=0;i<obj.length;i++){ if(obj[i].checked){ if(confirm("确认要删除吗?")){ window.open("<%=basePath%>deleteczrkjzry.do?systemid="+obj.value);}flag=false; } } if(flag){ alert("请选择一条记录!"); }}
function dc(){document.getElementById("queryform").action="<%=basePath%>dclwTzSwglSwzdryxx.do";document.getElementById("queryform").submit(); }</script>
跑马灯:
<script type="text/javascript"> var place=1; var i=0; function scroll() { place++; window.setTimeout("scroll()",50); } </script>
<body onload="scroll();">
<marquee style="width:600px;"> 今日航班预警<%=yjsl%>条
</marquee>
近一日、近两日、近一周
function hbyj(obj){ if(obj=='a0'){ $("#hbyjTitle").html("今日航班旅客预警"); $("#hbyj2").html("<iframe src=\"jrhbyj_mh_new.jsp\" id=\"hbyji1\" name=\"hbyji1\" frameborder=\"0\" width=\"648px\" height=\"250px\" scrolling=\"no\"></iframe>"); } if(obj=='a1'){ $("#hbyjTitle").html("近一天航班旅客预警"); $("#hbyj2").html("<iframe src=\"jrhbyj_mh_new1.jsp\" id=\"hbyji1\" name=\"hbyji1\" frameborder=\"0\" width=\"648px\" height=\"250px\" scrolling=\"no\"></iframe>"); } if(obj=='a2'){ $("#hbyjTitle").html("近两天航班旅客预警"); $("#hbyj2").html("<iframe src=\"jrhbyj_mh_new2.jsp\" id=\"hbyji1\" name=\"hbyji1\" frameborder=\"0\" width=\"648px\" height=\"250px\" scrolling=\"no\"></iframe>"); } if(obj=='a3'){ $("#hbyjTitle").html("近一周航班旅客预警"); $("#hbyj2").html("<iframe src=\"jrhbyj_mh_new3.jsp\" id=\"hbyji1\" name=\"hbyji1\" frameborder=\"0\" width=\"648px\" height=\"250px\" scrolling=\"no\"></iframe>"); } }
0 0
- 工作之需
- 工作一年之结语
- 工作之祭
- 工作之初体验
- 一周工作之记录
- 工作之旅
- 工作生活之我见
- 工作之余
- 工作之总结思考
- 我之工作感
- 杂七杂八之工作100207
- 工作之rule
- 工作之余
- 工作之余
- DLL之工作原理
- Linx之工作常用命令
- 寻找工作之路
- pthread之工作模式
- 小波变换 完美通俗解读【转载
- Mapr与Hbase工作(二)——HBase的升级
- Mapr与Hbase工作(三)——启用HBase的访问控制
- CentOS安装Freeradius
- ganglia varnish gmetric状态监控
- 工作之需
- Mapr与HCatalog工作
- OM销售-订单头信息
- Mapr与HCatalog工作(一)——HCatalog的升级
- Mapr与Hive工作
- Struts自定义类型 例子
- android 自定义登陆弹出框
- Mapr与Hive工作(一)——Hive的的ODBC连接器
- 8583报文详细分析 (转载,原创:小马blog.csdn.net/pony_maggie/article/details/6568192)