此回复为自动发出,仅用于显示而已,并无任何其他特殊作用
楼主【jackygaipeng】截止到2008-07-02 23:10:28的历史汇总数据(不包括此帖):
发帖的总数量:4 发帖的总分数:160
结贴的总数量:3 结贴的总分数:60
无满意结贴数:0 无满意结贴分:0
未结的帖子数:1 未结的总分数:100
结贴的百分比:75.00 % 结分的百分比:37.50 %
无满意结贴率:0.00 % 无满意结分率:0.00 %
楼主加油
楼主【jackygaipeng】截止到2008-07-02 23:10:28的历史汇总数据(不包括此帖):
发帖的总数量:4 发帖的总分数:160
结贴的总数量:3 结贴的总分数:60
无满意结贴数:0 无满意结贴分:0
未结的帖子数:1 未结的总分数:100
结贴的百分比:75.00 % 结分的百分比:37.50 %
无满意结贴率:0.00 % 无满意结分率:0.00 %
楼主加油
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
</head><body>
<script language="javascript">
var Array=[
['河北','6'],
['湖北','6'],
['北京','7'],
['天津','7']
];
function $(o){return document.getElementById(o);}
function showFirst(Value){
var sel=$("two");
sel.options.length=1;
for(var i=0;i<Array.length;i++){
var ary=Array[i];
sel.options.add(new Option(ary[0],ary[0]));
}
if(Value=="航空货运"){
var a=18+((4.2-1)/0.5)*7;
showValue(a);
}
else if(Value=="公路货运"){
var a=12+((4.2-1)/0.5)*7;
showValue(a);
}
return;
}function showValue(Value){
$("newTxt").value=Value;
}
function showValue1(Value){
for(var i=0;i<Array.length;i++){
var ary=Array[i];
if(Value==ary[0]){
$("newTxt").value=18+((4.2-1)/0.5)*ary[1];
}
}
}
</script>
<select onChange="showFirst(this.options[this.selectedIndex].value);" id="first">
<option value="" selected>请选择</option>
<option value="航空货运">航空货运</option>
<option value="公路货运">公路货运</option>
<option value="其它方式">其它方式</option>
</select><select id="two" onChange="showValue1(this.options[this.selectedIndex].value);">
<option value="">请选择</option>
</select>
<input type="text" id="newTxt" value="">
</body>
</html>呵呵,我用了一个例子公式测试给你看,你到时候换成你要计算的公式就可以了
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
</head><body>
<script language="javascript">
var Array=[
['河北','6'],
['湖北','6'],
['北京','7'],
['天津','7']
];
function $(o){return document.getElementById(o);}
function showFirst(Value){
var sel=$("two");
var zl=$("zl");
sel.options.length=1;
for(var i=0;i<Array.length;i++){
var ary=Array[i];
sel.options.add(new Option(ary[0],ary[0]));
}
if(Value=="航空货运"){
var a=18+((parseFloat(zl.value)-1)/0.5)*7;
showValue(a);
}
else if(Value=="公路货运"){
var a=12+((parseFloat(zl.value)-1)/0.5)*7;
showValue(a);
}
return;
}function showValue(Value){
$("newTxt").value=Value;
}
function showValue1(Value){
var zl=$("zl");
for(var i=0;i<Array.length;i++){
var ary=Array[i];
if(Value==ary[0]){
$("newTxt").value=18+((parseFloat(zl.value)-1)/0.5)*ary[1];
}
}
}
</script>
重量:<input id="zl" name="zl" value="">
<select onChange="showFirst(this.options[this.selectedIndex].value);" id="first">
<option value="" selected>请选择</option>
<option value="航空货运">航空货运</option>
<option value="公路货运">公路货运</option>
<option value="其它方式">其它方式</option>
</select><select id="two" onChange="showValue1(this.options[this.selectedIndex].value);">
<option value="">请选择</option>
</select>
<input type="text" id="newTxt" value="">
</body>
</html>
呵呵,给你加一个输入重量的在里面
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
</head><body>
<script language="javascript">
var Array=[
['河北','6'],
['湖北','6'],
['北京','7'],
['天津','7']
];
function $(o){return document.getElementById(o);}
function showFirst(Value){
var sel=$("two");
var zl=$("zl");
sel.options.length=1;
for(var i=0;i<Array.length;i++){
var ary=Array[i];
sel.options.add(new Option(ary[0],ary[0]));
}
if(Value=="航空货运"){
var a=18+((parseFloat(zl.value)-1)/0.5)*7;
showValue(a);
}
else if(Value=="公路货运"){
var a=12+((parseFloat(zl.value)-1)/0.5)*7;
showValue(a);
}
return;
}function showValue(Value){
$("newTxt").value=Value;
}
function showValue1(Value){
var zl=$("zl");
var first=$("first");
var yj;
if(first.value=="航空货运"){
yj=18;
}
else if(first.value=="公路货运"){
yj=12;
}
for(var i=0;i<Array.length;i++){
var ary=Array[i];
if(Value==ary[0]){
$("newTxt").value=parseFloat(yj)+((parseFloat(zl.value)-1)/0.5)*ary[1];
}
}
}
</script>
重量:<input id="zl" name="zl" value="">
<select onChange="showFirst(this.options[this.selectedIndex].value);" id="first">
<option value="" selected>请选择</option>
<option value="航空货运">航空货运</option>
<option value="公路货运">公路货运</option>
<option value="其它方式">其它方式</option>
</select><select id="two" onChange="showValue1(this.options[this.selectedIndex].value);">
<option value="">请选择</option>
</select>
<input type="text" id="newTxt" value="">
</body>
</html>这个更完善些
第一个就是
var Array=[
['河北','6'],
['湖北','6'],
['北京','7'],
['天津','7']
];
把这个树组改成你的,格式是[['省份','价格'],]