var bool=elem.hasAttribute("name")的含义是
举一反三
- 以下语句是正确的变量声明语句的是()。 A: var name = "张三" ; B: var null = 123 ; C: var name = "张三",age = 18 ; D: var name , age ;
- 以下能够创建一个对象的是( )。 A: var obj=new Object( ) ; B: var obj=function(name){this.name=name ; }<br> var p1=new obj( "张三" ) ; C: var obj={ name : "张三" ; } D: var obj=Object.create( { name: "张三" } ) ;
- 以下关于字符串变量的声明不正确的是? A: var myText = "my name is zhangsan"; B: var myText = 'my name is zhangsan'; C: var myText = 'my name is zhangsan"; D: var myText = "my name is\t zhangsan";
- 下列方法中,能正确创建 JavaScript 对象的是( )。 A: var txt = new Object[name:"George",price:25] B: var txt = new Object(name:"George",price:25) C: var txt = new Object{name:"George",price:25} D: var txt = new Object({name:"George",price:25})
- 下列方法中,能正确创建 JavaScript 对象的是( )。 A: var txt = new Object[name:"George",price:25] B: var txt = new Object(name:"George",price:25) C: var txt = new Object{name:"George",price:25} D: var txt = new Object({name:"George",price:25})