总是记不住向方法中传数组参数的语法,所以记录一下. func calculateStatistics(scores:[Int]) -> (min:Int,max:Int,sum:Int) { var min = scores[] var max = scores[] var sum = for score in scores { if score>max { max=score } else if score<min{ min=score } sum += score } return…
springmvc框架 var param = new Object(); var arr = new Array(); arr.push(1,2,3); param.ids=JSON.stringify(arr);var user = new Object(); user.name="hehe"; user.age=22; user.gender="man"; param.user=JSON.stringify(user);$.ajax({ type:"…