<html>
<head>
<title></title>
<SCRIPT LANGUAGE=javascript>
<!--
function saveas(){
var arrO=[document.all.a,document.all.b,document.all.c,document.all.d];
var fltVal=0;
var arrPercent=[0.2,0.3,0.4,0.5];
for(var i=0;i<arrO.length;i++){
var o=arrO[i];
var strTemp=o[o.selectedIndex].value;
fltVal+=parseFloat(parseInt(strTemp) * arrPercent[i]);
}
fltVal=fltVal.toFixed(2);
document.all.g.value=(fltVal * 100 .toString()) + "%";

var strFile=document.all.f.value;

var winSave = window.open();
winSave.document.open ("text/html","gb2312");
winSave.document.write (fltVal);
winSave.document.execCommand ("SaveAs",true,"c:\\"+strFile);
winSave.close();
}
//-->
</SCRIPT></head>
<body>
A:
<select name=a id=a>
<option value=1>1
<option value=2>2
</select><BR>B:
<select name=b id=b>
<option value=1>1
<option value=2>2
</select><BR>C:
<select name=c id=c>
<option value=1>1
<option value=2>2
</select><BR>D:
<select name=d id=d>
<option value=1>1
<option value=2>2
</select><BR><INPUT type="text" id=f name=f><BR>
<INPUT type="text" id=g name=g readonly><INPUT type="button" value="Button" id=button1 name=button1 onclick="saveas()">
</body>
</html>