單項選擇題

在HTML頁面中包含一個按鈕控件mybutton,如果要實現(xiàn)點擊該按鈕時調(diào)用已定義的Javascript函數(shù)compute,要編寫的HTML代碼是()

A.<input name=”mybutton” type=”button” onBlur=”compute()”value=”計算”> 
B.<input name=”mybutton” type=”button” onFocus=”compute()”value=”計算”> 
C.<input name=”mybutton” type=”button” onClick=”function compute()”value=”計算”> 
D.<input name=”mybutton” type=”button” onClick=”compute()”value=”計算”>

微信掃碼免費搜題