针对以下题目,请选择最符合题目要求的答案。针对每一道题目,所有答案都选对,则该题得分,所选答案错误或不能选出所有答案,则该题不得分。每题2分)
-
在javascript中,系统时间为“2012-2-20”,调用Date对象的getMonth()方法得到的结果是(). (选择一项) A. 2 B. 3 C. 1 D. 什么都不显示
-
在javascript中,下列正则表达式的重复字符描述不正确的是() (选择一项)
A. {n} 匹配前的一项n次 B. * 匹配前一项0次或多次 C. + 匹配前一项1次 D. {n},匹配前一项n次,或者多次
-
在javascript中,下列代码可以实现弹出的窗口不可调节尺寸的是()。 (选择二项) A. window.open(“test.html”,”弹出窗口”,”resizable=no”); B. window.open(“test.html”,”弹出窗口”,”resizable=yes”); C. window.open(“test.html”,”弹出窗口”,”resizable=0”); D. window.open(“test.html”,”弹出窗口”,”resizable=1”);
-
在javascript中,下列方法中相当于客户端点击F5(刷新)的是(). (选择二项)
A. document.replace(); B. document.reload(); C. location.replace(location.href); D. location.reload();
-
在javascript中,下列选项中能够得到最后一个“Mary”的是(). var str = “this is Mary She is Mary”; (选择二项) A. var a = str.substring(str.indexOf(“Mary”,13)); B. var a = str.substring(str.indexOf(“Mary”,13),str.length); C. var a = str.substring(str.indexOf(“Mary”)); D. var a = str.substring(str.indexOf(“Mary”),str.indexOf(“Mary”)+4);
-
在javascript中,下列选项能把“毒皇后”这一行删除的是(). (选择一项)
七个小矮人 7 毒皇后 100 白雪公主 8
A. document.getElementById(“td”).deleteRow(1); B. document.getElementById(“td”).deleteRow(2); C. document.getElementById(“td”).deleteRow[1]; D. document.getElementById(“td”).deleteRow[2];
-
在javascript中,以下对字符串 varStr = “Thank You”的操作,说法正确的是(). (选择二项) A. varStr.substring(1,5)返回值是”Than” B. varStr.length返回值为9 C. varStr.indexOf(“You”)返回值为7 D. varStr.toUpperCase()的返回值为”THANK YOU”
-
在javascript中,以下变量命名不合法的是(). (选择一项) A. num_1 B. 2num C. sum D. n2$c
-
在javascript中,以下选项可以重新加载当前面的是(). (选择一项) A. history.reload() B. location.reload() C. history.reload() D. location.refresh()
-
在javascript中,可以使用窗口“后退” 显示前一个页面的代码是() (选择二项)
A. history.back() B. history.goBack() C. history.back(-1) D. history.go(-1)
-
在javascript中,当按下回车键时会触发onkeydown事件,则event.keyCode的值为(). (选择一项) A. 10 B. 31 C. 13 D. 65
-
在javascript中,以下选项()可以关闭当前浏览器窗口。 (选择一项)
A. 关闭窗口 B. 关闭窗口 C. 关闭窗口 D. 关闭窗口
-
有如下javascript代码,要验证邮箱中是否包含“@”和“.”,以下选项正确的是() var mail = document.getElementById(“email”).value; (选择两项) A. if(mail.indexOf(“@”)1){ alert(“Email格式不正确,必须包含@”) return false; } B. if(mail.charAt(“@”)-1){ alert(“Email格式不正确,必须包含@”) return false; } C. if(mail. indexOf (“.”)–1){ alert(“Email格式不正确,必须包含. ”) return false; } D. if(mail. charAt (“.”)–1){ alert(“Email格式不正确,必须包含. ”) return false; }
-
在javascript中,要验证输入学号的文本框不能为空,正确的代码为()。 (选择一项) A. var id = document.getElementById(“ID”).value if(id==””){ alert(“ID不能为空”); return false; } B. var id = document.getElementById(“ID”).Text; if(id==””){ alert(“ID不能为空”); return false; } C. var id = window.getElementById(“ID”).value; if(id==””){ alert(“ID不能为空”); return false; } D. var id = window.getElementById(“ID”).Text; if(id==””){ alert(“ID不能为空”); return false; }
-
在javascript中,关于以下代码,说法正确的是(). (选择一项) var s = document.getElementByTagName(“div”); for(var i=0;i
关注打赏
最近更新
- 深拷贝和浅拷贝的区别(重点)
- 【Vue】走进Vue框架世界
- 【云服务器】项目部署—搭建网站—vue电商后台管理系统
- 【React介绍】 一文带你深入React
- 【React】React组件实例的三大属性之state,props,refs(你学废了吗)
- 【脚手架VueCLI】从零开始,创建一个VUE项目
- 【React】深入理解React组件生命周期----图文详解(含代码)
- 【React】DOM的Diffing算法是什么?以及DOM中key的作用----经典面试题
- 【React】1_使用React脚手架创建项目步骤--------详解(含项目结构说明)
- 【React】2_如何使用react脚手架写一个简单的页面?