JSFiddle - React, Tailwind, and code Playground
HTML
<script>
function _click(){
var theform = document.forms[0];
var rv = 0;
var sv = 0;
for(var i=0;i<theform._radio.length;i++)
{
if(theform._radio[i].checked)
{
rv = theform._radio[i].value;
}
} //radio
for(var i=0;i<theform._select.options.length;i++)
{
if(theform._select.options[i].selected)
{
sv = theform._select.options[i].value;
}
} //select
var inpva = parseInt(document.getElementById("_input1").value);
var aaaa= parseInt(sv*rv);
if(!isNaN(inpva) && !isNaN(aaaa))
document.getElementById("_input2").value= aaaa+inpva ;
else
document.getElementById("_input2").value= '' ;
}
</script>
<form>
<input type="radio" name="_radio" value="10">10</input>
<input type="radio" name="_radio" value="20">20</input>
<select name="_select">
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
</select>
<input type="text" name="_input1" id="_input1">
<button type="reset" value="">清除</button>
<button type="button" onclick="_click(this.form)">=</button>
<input type="text" readonly="true" name="_input2" id="_input2">
</form>