随笔分类 -  web

摘要:SpringMVC表单标签简介 在使用SpringMVC的时候我们可以使用Spring封装的一系列表单标签,这些标签都可以访问到ModelMap中的内容。下面将对这些标签一一介绍。 在正式介绍SpringMVC的表单标签之前,我们需要先在JSP中声明使用的标签,具体做法是在JSP文件的顶部加入以下指... 阅读全文
posted @ 2014-12-10 11:08 积累从点滴开始 阅读(2712) 评论(0) 推荐(0)
摘要:和以往写struts2程序一样,action方法跳转到一个JSP中,为了配合jsonp的跨域,要在JSP中做一个输出JSP:其中jsonStr是从action层赋值号的,要传给接口的返回值--------------------------------------------------------... 阅读全文
posted @ 2014-12-10 11:02 积累从点滴开始 阅读(3510) 评论(0) 推荐(0)
摘要:1.直接嵌入js代码:2.在中,加入: 阅读全文
posted @ 2014-05-05 14:33 积累从点滴开始 阅读(222) 评论(0) 推荐(0)
摘要:Document 阅读全文
posted @ 2014-04-15 16:56 积累从点滴开始 阅读(1517) 评论(0) 推荐(0)
摘要:js读写cookie//JS操作cookies方法!//写cookiesfunction setCookie(name,value){var Days = 30;var exp = new Date();exp.setTime(exp.getTime() + Days*24*60*60*1000);document.cookie = name + "="+ escape (value) + ";expires=" + exp.toGMTString();}//读取cookiesfunction getCookie(name){var arr,reg=ne 阅读全文
posted @ 2014-03-15 15:40 积累从点滴开始 阅读(274) 评论(0) 推荐(0)
摘要:html代码:js代码:function uploadImg(cookbookId){ var cbId = cookbookId; $.ajaxFileUpload({ url:'${web.context.path}/restaurant/uploadCookbookImg.action', //上传文件的服务端 secureuri:false, //是否启用安全提交 dataType: 'text', //数据类型 ... 阅读全文
posted @ 2014-03-11 17:43 积累从点滴开始 阅读(663) 评论(0) 推荐(0)
摘要:需求:有一个数组:(北京菜,粤菜),checkbox如下:现在想通过遍历这个数组,使数组里包含的值,在checkbox选中代码:var flavors = new Array([北京菜 , 粤菜]);$.each(flavors,function(i,item){$("input[name='checkboxFlavor'][value="+item+"]").attr("checked","checked");});体会:选择器的[]可以有多重的选择条件 阅读全文
posted @ 2014-02-24 16:28 积累从点滴开始 阅读(3600) 评论(0) 推荐(0)
摘要:var video_src_file = $("#video_src_file").val(); var fileTypes = new Array("flv","3gp","mpeg","avi","mp4"); //定义可支持的文件类型数组 var fileTypeFlag = "0"; var newFileName = video_src_file.split('.'); newFileName = newFileName[newF 阅读全文
posted @ 2013-12-07 14:29 积累从点滴开始 阅读(12320) 评论(0) 推荐(0)
摘要:通过IP获取当前所在城市 阅读全文
posted @ 2013-11-01 15:51 积累从点滴开始 阅读(992) 评论(0) 推荐(0)
摘要:假设table的id为:t1$(document).ready(function(){ $('#t1 > tbody tr:even').css('background','white'); $('#t1 > tbody tr:odd').css('background','#f1f5f8'); });even为奇数行,odd为偶数行效果如图: 阅读全文
posted @ 2013-07-03 16:32 积累从点滴开始 阅读(7423) 评论(1) 推荐(0)
摘要:<select id="taskauditStatus4audit" name="taskaudit.status4audit"> <option value="-1">请选择</option> <option value="0">未审核</option> <option value="1">审核成功</option> <option value="2">审核失败</opti 阅读全文
posted @ 2013-02-04 15:58 积累从点滴开始 阅读(21755) 评论(1) 推荐(0)
摘要:前提:时间为yyyy-MM-ddvarlicenseStartYear=$("#时间1").val();varlicenseEndYear=$("#时间2").val();vararrStart=licenseStartYear.split("-");vararrEnd=licenseEndYear.split("-");varstartTime=newDate(arrStart[0],arrStart[1],arrStart[2]);varendTime=newDate(arrEnd[0],arrEnd[1],a 阅读全文
posted @ 2012-10-23 16:03 积累从点滴开始 阅读(536) 评论(0) 推荐(0)
摘要:functionfuncTest(){//每隔3秒执行一次timelyFun方法window.setInterval("timelyFun()",3000);}window.onload=funcTest;另外有setTimeout方法,这两个方法之间的区别就是:setInterval方法是每隔一段时间执行一次,是循环执行的,而setTimeout方法是页面加载完毕之后的规定时间内执行一次,就不再执行了 阅读全文
posted @ 2012-07-03 15:55 积累从点滴开始 阅读(30659) 评论(2) 推荐(2)
摘要:selectCURDATE()如果要比较日期,比如查询当天的呼出记录,那就可以这样写:selectcount(*)fromaliav_task_calloutwhereorderId='TestD_1340182435078'andcalloutTime>CURDATE() 阅读全文
posted @ 2012-07-03 15:53 积累从点滴开始 阅读(10447) 评论(0) 推荐(0)
摘要:var str = "abd def";var arr = new Array();arr = str.split(" ");if(arr.length != 1){ alert("字符串含有空格!"); return false;} 阅读全文
posted @ 2012-06-24 07:45 积累从点滴开始 阅读(16843) 评论(1) 推荐(0)
摘要:functionrotateImage(imgId){imageToRotate=document.getElementById(imgId);imageToRotate.style.filter="progid:DXImageTransform.Microsoft.Matrix(sizingMethod='autoexpand')";rotate();}varimageToRotate;vardegreeToRotate=0;functionrotate(){vardeg2radians=Math.PI*180/360;degreeToRotate++;d 阅读全文
posted @ 2012-06-23 22:21 积累从点滴开始 阅读(7446) 评论(0) 推荐(1)
摘要:s:select用法和html的select用法不大相同先举个例子<s:select id="caAvApplycurrencyTypeCn" name="caAvApply.currencyTypeCn" list="#request.currencyTypeCnTypeList" listKey="dictValue" listValue="dictName" headerKey="" headerValue="请选择" value=" 阅读全文
posted @ 2012-06-11 13:39 积累从点滴开始 阅读(29266) 评论(0) 推荐(2)
摘要:在子窗口中加入代码:<bodyonLoad="refreshParent()">......</body><scriptlanguage="javascript">functionrefreshParent(){window.opener.location.href=window.opener.location.href;if(window.opener.progressWindow)window.opener.progressWindow.close();alert("保存成功");window. 阅读全文
posted @ 2012-06-09 22:25 积累从点滴开始 阅读(4826) 评论(0) 推荐(0)
摘要:在页面的顶部加入代码:<aname="startPotion"></a>然后置顶按钮:<inputtype="button"value="置顶"onclick="toTop()">js函数:functiontoTop(){Window.location.href="#startPotion"}置底的方法同置顶 阅读全文
posted @ 2012-06-09 22:22 积累从点滴开始 阅读(4220) 评论(0) 推荐(0)
摘要:<actionname=""class=""method=""><resulttype="redirect-action"><paramname="actionName">重定向的目标action名字</param><paramname="namespace">重定向目标所属namespace,默认的不用写</param>(下面就是罗列出携带的参数)<paramname=""&g 阅读全文
posted @ 2012-06-09 22:20 积累从点滴开始 阅读(2656) 评论(0) 推荐(0)