三、订单修改页面:orderform.htm
untitled document
var the_list =unescape(readorderform(24_orderform)); document.write(the_list); if (the_list==false||the_list.indexof("|")==-1) { var totals=0 document.write("您还没有选购任何商品!") } else { document.orderform.storage.value=the_list; var totals; var broken_list = the_list.split("|"); // for (i=1;i { var single_list=broken_list[i]; var broken_single_list = single_list.split("&"); var subtotals=broken_single_list[2]*(broken_single_list[3]*100)/100; //note:broken_single_list[0]=item; //note:broken_single_list[1]=name; //note:broken_single_list[2]=amount; //note:broken_single_list[3]=price; // if (totals==null) { totals=subtotals; } else { totals=totals*100+subtotals*100; totals=totals/100; } //–> document.write(" document.write(" |
document.write("
"+broken_single_list[1]+"");document.write("
"+broken_single_list[3]+"");document.write("
"+" "+"");document.write("
");document.write("
");document.write("
");document.write("
");}
//->
//if (totals==null)
//{totals=0;}
}
价格总计: |
document.orderform.total.value=totals;
本文介绍了一个简单的订单修改页面实现逻辑,通过JavaScript操作DOM元素来显示已选商品的名称、价格等信息,并计算总价。该页面从后端读取订单数据并展示。

被折叠的 条评论
为什么被折叠?



