![](https://img-blog.csdnimg.cn/20201014180756919.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
js
遗失在古战场
IT没什么
展开
-
jquery操作数组
var selectCount=[];添加元素: selectCount.push($(this).val());删除元素: var index=selectCount.indexOf($(this).val()); if(index!=-1){ selectCount.splice(index,1);}原创 2017-08-05 16:35:45 · 292 阅读 · 0 评论 -
jquery ajax传递数组
//定义一个数组var selectCount=[];$.ajax({url:'/bb/aaa',type:'post',dateType:'json',traditional:true, //注意这个地方data:{'selectCount':selectCount},success:function(res){},error:functi原创 2017-08-05 16:32:55 · 1163 阅读 · 0 评论 -
js获取项目路径
function getPath(){ var pathName = document.location.pathname; var index = pathName.substr(1).indexOf("/"); var result = pathName.su翻译 2017-10-09 23:18:07 · 309 阅读 · 0 评论 -
jsp页面传参中文乱码
前一个页面var myurl=getRootPath()+"/pages/admin/detailPartol.jsp?patrolName="+patrolName; window.location.assign(encodeURI(myurl));接收页面 var str=decodeURI(location.href);翻译 2017-10-09 23:46:36 · 232 阅读 · 0 评论 -
ajax文件上传
spring ajax文件上传翻译 2017-11-10 12:08:07 · 228 阅读 · 0 评论