摘要: 使用方法:<script id="testTemplate" type="text/x-jquery-tmpl"> //模板</script>有{{if}}{{/if}}、{{each}}{{/each}}等关键字使用变量:${变量名称}<!DOCTYPE html><html> <head> <title>jquery tmpl</title> <meta http-equiv="Content-Type" content="text 阅读全文
posted @ 2013-01-13 23:29 前端咖 阅读(529) 评论(0) 推荐(0) 编辑
摘要: 选择排序:基本思想是依次从待排序中选择出关键字值最小的记录、关键字值次之的记录……,并分别将它们定位到序列左侧的第一个位置、第二个位置……,从而使待排序的记录序列成为按关键字值由小到大排列的有序序列。直接选择排序:从第i个无序列表arr[i...n]中,选择关键字值最小的记录将其插入有序列表的末尾arr[n-i+1],交换一次位置。function selectionSort(arr){ var n = arr.length; for(var i = 0; i<n-1; i++){ var tmp = i; for(var j = i+1; j <n;j... 阅读全文
posted @ 2013-01-13 23:14 前端咖 阅读(559) 评论(0) 推荐(0) 编辑