首页 › 答案 › 题库 › 知到智慧树 › 未分类

在HTML页面中包含一个按钮控件mybutton,如果要实现点击该按钮时调用已定义的Javascript函数compute,要编写的HTML代码是

在HTML页面中包含一个按钮控件mybutton,如果要实现点击该按钮时调用已定义的Javascript函数compute,要编写的HTML代码是
A.<inputname=”mybutton”type=”button”onBlur=”compute()”value=”计算”>
B.inputname=”mybutton”type=”button”onFocus=”compute()”value=”计算”>
C.inputname=”mybutton”type=”button”onClick=”functioncompute()”value=”计算”>
D.inputname=”mybutton”type=”button”onClick=”compute()”value=”计算”>
正确答案:D