单项选择题在HTML页面中包含一个按钮控件mybutton,如果要实现点击该按钮时调用已定义的Javascript函数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=“functioncompute()” value=“计算”〉
D.〈input name=“mybutton” type=“button” onClick=“compute()” value=“计算”〉


您可能感兴趣的试卷

你可能感兴趣的试题

1.多项选择题在Javascript中,对于浏览器对象的层次关系理解正确的是()。

A.window对象是所有页面内容的根对象
B.document对象包含location对象和history对象
C.location对象包含history
D.document对象包含form对象

4.单项选择题在HTML页面上编写Javascript代码时,应编写在()标签中间。

A.〈javascript〉和〈/javascript〉
B.〈script〉和〈/script〉
C.〈head〉和〈/head〉
D.〈body〉和〈/body〉

5.单项选择题在HTML页面中,不能与onChange事件处理程序相关联的表单元素有()。

A.文本框
B.复选框
C.列表框
D.按钮

6.单项选择题在Javascript中要改变页面文档的背景色,需要修改document对象的()属性。

A.BackColor
B.BackgroundColor
C.BgColor
D.Background

7.单项选择题在HTML文档对象模型中,history对象的()用于加载历史列表中的下一个URL页面。

A.next()
B.back()
C.forward()
D.go(-1)

9.单项选择题HMTL表单的首要标记是〈form〉,〈form〉标记的参数method表示表单发送的方法,可能为get或post,下列关于get和post的描述正确的是()。

A.post方法传递的数据对客户端是不可见的
B.get请求信息以查询字符串的形式发送,查询字符串长度没有大小限制
C.post方法对发送数据的数量限制在255个字符之内
D.get方法传递的数据对客户端是不可见的

10.单项选择题在使用Javascript实现省市级联菜单功能时,在添加城市列表前清空原来的下拉选项的代码是()。

A.document.myform.selCity.options.clear()
B.document.myform.selCity.options.deleteAll()
C.document.myform.selCity.options.length=0
D.document.myform.selCity.options.size=0