var form=document.getElementById("showDataForm")
var fd = new FormData(form)
$.ajax({
url: "upload.php",
type: "POST",
processData: false,
contentType: false,
data: fd,
success: function(d) {
console.log(d)
}
})
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html>
<head>
<meta http-equiv=Content-Type content="text/htmlcharset=gb2312">
<script type="text/javascript">
function cal() {
var typeVal = document.getElementById("type").value
var cntVal = document.getElementById("cnt").value
var totalObj = document.getElementById("total")
totalObj.value = typeVal * cntVal
}
</script>
</head>
<body>
种类:
<select id="type" onChange="cal()">
<option value="50000">5万</option>
<option value="100000">10万</option>
<option value="150000">15万</option>
<option value="200000">20万</option>
<option value="250000">25万</option>
<option value="300000">30万</option>
</select>
<br />
数量:
<select id="cnt" onChange="cal()">
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
</select>
<br />
金币数:
<input id="total" type="text" width="100px">
</body>
</html>