嗨,我已经创建了一个表格,但是当我输入分数时,它没有更新
<script type="text/javascript">
function updateTable(){
document.getElementById('err').innerHTML = '';
var firstdropbox = document.getElementById("first").value;
var seconddropbox = document.getElementById("second").value;
var box1 = Number(document.getElementById("txtbox1").value);
var box2 = Number(document.getElementById("txtbox2").value);
var a = Number(document.getElementById(firstdropbox).innerHTML);
var b = Number(document.getElementById(seconddropbox).innerHTML);
if(firstdropbox==seconddropbox){
alert("Must select two different teams..");
return false;
}
if(a>6){
alert("Can play only 7 matches");
return false;
}
if(firstdropbox != seconddropbox){
document.getElementById(firstdropbox).innerHTML = a + 1;
document.getElementById(seconddropbox).innerHTML = b + 1;
}
}
</script>