請幫我看看錯誤,正常的按鈕「Redial」正常,但「hangoff」一個沒有。Uncaught TypeError:無法設置屬性'onclick'null,input type =「img」
<div id="buttons">
<button type="button" id="Redial">Call</button>
<input type="image" src="hangup.png" alt="hangoff">
</div>
var hangoff = document.querySelector("#hangoff");
var Redial = document.querySelector("#Redial");
hangoff.onclick = Dropcall;
Redial.onclick = Callagain;
function Dropcall() {
phone.hangup();
remoteStream.parentNode.removeChild(remoteStream);
}
function Callagain() {
window.location.reload();
}
@ihoworko我這麼心存感激的你只是做了,有時候我們玩愚蠢的,但答案就在我們眼前,非常感謝你... – toms456