全部分数求救
<body>
<form name="form1">
<select name="item" onchange="count(this)" > 选择产品编号</select>
<table>
<tr><td>Item Id </td><td>Description </td><td>Unit Price </td><td>Total Qty </td><td>Total Amount </td> </tr>
<tr>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
</table>
</form>
</body>
<script language="JavaScript">
var MyFatherObject = form1.item;
//父组
var ArrayFather =new Array("K01","K02","K03","K04");//子组1
var Arraychild1 = new Array();
//子组2
var Arraychild2 = new Array();
//产品型号,名称,价格,编号,卖出时间,卖出数量
Arraychild1["K01"] = new Array("K01","Keyboard","10.00","1","01-06-08","20");
Arraychild1["K02"] = new Array("K02","Mouse","20.00","2","01-06-08","17");
Arraychild1["K03"] = new Array("K03","Printer","500.00","3","13-06-08","4");
Arraychild1["K04"] = new Array("K04","Scanner","300.00","4","13-06-08","15");
Arraychild1["K02"] = new Array("K02","Mouse","20.00","5","23-06-08","15");
Arraychild2["K01"] = new Array("K01","Keyboard","10.00","6","23-06-08","20");//缺省载入
for(var k=0;k<ArrayFather.length;k++){
MyFatherObject.options[k]=new Option(ArrayFather[k],ArrayFather[k]);
}
function count(){
var father = MyFatherObject.options[MyFatherObject.selectedIndex].value;
for(var i =0;i<father.length;i++){
}
}
</script>
描述下思路
1.当我连动选择了K01的时候,我如何去判断K01在一个月的销售记录总共有几次
我上边一定些好了两次,但是我该如何去判断。
2.当我得到了K01在一个月的销售记录次数后我如何去在表中打印如下效果
选择型号: K01
型号 名称 单价 卖出数量 总价格
K01 Keyboard 10 40 400
3.其中卖出数量需要循环K01销售记录并把每次的销售数量加起来
在线求助。11点结贴
[解决办法]
这个是jsp吗?
有没有map 之类的可以用啊.