html部分
- 序列
- 名称
- 数量
- 单价(Q点)
- 总计(Q点)
- 1
- 农场话费A
- 2
- 50
- 100
- 2
- 飞车道具C
- 1
- 80
- 80
- 3
- 空间K
- 1
- 120
- 120
- 4
- 农场狗粮C
- 4
- 60
- 240
- 5
- 音速种子
- 2
- 110
- 220
- 6
- 农场化肥D
- 5
- 60
- 300
- 7
- AVA装扮C
- 1
- 300
- 300
- 8
- 三国道具C
- 15
- 60
- 900
- 9
- DNF道具B
- 4
- 300
- 1200
- 10
- 农场化肥H
- 6
- 80
- 120
- 11
- 农场化肥B
- 1
- 80
- 80
- 12
- Q宠元宝
- 100
- 1
- 100
- 13
- 三国道具K
- 9
- 20
- 180
css部分
* { margin: 0; padding: 0;}body { font-family: "microsoft yahei"; background-color: #eee; user-select: none;}#chenkbox { margin: 100px auto; width: 800px; position: relative; }#tableSort{ border-right:#0066cc 1px solid; border-bottom: #0066cc 1px solid; height: 434px;}li{ list-style: none;}#box { position: absolute; display: none; background: #fff; text-align: center; top: 0; background-color: #000; background-color: rgba(0,0,0,0.8); color: #fff; height: 100%; cursor: move;}#box p { line-height: 2;}#chenkbox ol{ height: 30px; line-height: 30px;}#chenkbox ul{ width: 100%; height: 30px; cursor: move; line-height: 30px; }#chenkbox li{ width: 19.87%; float: left; border-top: #0066cc 1px solid; border-left: #0066cc 1px solid; text-align: center;}
js部分
var ochek=document.getElementById("chenkbox"); var ul=document.getElementsByTagName('ul'); var box=document.getElementById("box"); var arr=[]; for(var i=0;i