-1
function changeHiddenInput(cLeague, nLeague) {
console.log(cLeague);
console.log(nLeague);
var objHidden1 = document.getElementById("hiddenInput1");
var objHidden2 = document.getElementById("hiddenInput2");
objHidden1.value = cLeague.value;
objHidden2.value = nLeague.value;
var a = objHidden1.value;
var b = objHidden1.value;
result.innerHTML = a + b;
}
<select class="form-control" id="currentleague" onchange="document.getElementById('currentleague').src=this.value; changeHiddenInput(select)">
<option value="rankicons/bronze5.png" (another value goes somewhere in here)>Bronze V</option>
</select>
基本上第一個onchange更改圖像的值,第二個onchange傳入一個值,並做一些數學。有沒有其他方法可以用來評估價值,還是我可以以某種方式傳遞兩個價值觀,並以某種方式將它們分開?我有兩個onchange方法和兩個值我需要通過
不清楚的問題!這是什麼意思? ''? –