已知定义如下
var a = "abcd";
var b = "abcd";
var c = new String("abcd");
var d = new String("abcd");
下列输出是()
document.writeln(a == b);
document.writeln(a === b);
document.writeln(a == c);
document.writeln(a === c);
document.writeln(c == d);
document.writeln(c === d);
var a = "abcd";
var b = "abcd";
var c = new String("abcd");
var d = new String("abcd");
下列输出是()
document.writeln(a == b);
document.writeln(a === b);
document.writeln(a == c);
document.writeln(a === c);
document.writeln(c == d);
document.writeln(c === d);
举一反三
- 已知定义如下 var a = "abcd"; var b = "abcd"; var c = new String("abcd"); var d = new String("abcd"); 下列输出是() document.writeln(a == b); document.writeln(a === b); document.writeln(a == c); document.writeln(a === c); document.writeln(c == d); document.writeln(c === d);
- 已知定义如下vara=abcd;varb=abcd;varc=newString(abcd);vard=newString(abcd);下列输出是()document.writeln(a==b);document.writeln(a===b);document.writeln(a==c);document.writeln(a===c);document.writeln(c==d);document.writeln(c===d);
- 智慧职教: 分析下面这个程序运行的结果() < script language=”JavaScript”> var str=”字符串” with(document) { writeln(“您好,”) write(“欢迎光临本网页!” +” ”) writeln(“ 在js标签之间,”) writeln(str+”可以写在这里 ”) } script>
- 智慧职教: 分析下面这段代码运行的结果() < scriptlanguage=”JavaScript”> with(document) { writeln(“最后一次修改时间:” +document.lastModified+” ”) writeln(“标题:” +document.title+” ”) writeln(“URL:” +document.URL+” ”) } script>
- 分析下面这段代码运行的结果()。<;script type="text/javascript">;with(document){writeln("最后一次修改时间:"+document.lastModified+"<;br>;");writeln("标题:" +document.title+"<;br>;");writeln("URL:" +document.URL+"<;br>;");}<;/script>; A: 只输出最后一次修改的时间 B: 只输出文档的标题 C: 输出文档的标题、最后一次修改时间和当前的URL D: 什么也不输出