Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

一拳前端考題

4,190 views

Published on

一拳前端考題

Published in: Technology
  • Login to see the comments

一拳前端考題

  1. 1. 
 
 
 
 <input type="input"> <input type="tel"> <input type="text">
  2. 2. ' ' var a = { 'a1': 1, 'a2': 2,'a3':3 }; var b = [ ]; b.push(a); b.push(a); b[0]['a1'] = 2; b[0]['a3'] = b[0]['a1'] ; b[1]['a3'] = ?
  3. 3. <div class="circle">
  4. 4. HTML <a class="a b">HELLO</a> CSS a{ color:red } b{ color:blue }
  5. 5. 1 == 1 "1" == 1 1 == '1' 0 == false 0 == null 0 == undefined null == undefined
  6. 6. HTML <a class="a b">HELLO</a> CSS a{ color:red } b{ color:blue }
  7. 7. 
 

  8. 8. 
 

  9. 9. 'use strict'; const PI = 3.1415; PI = 3; function bar(num){ let barTime = 3; return num+barTime }
  10. 10. var abc1 = '123'; function show_img() { var abc2 = '456'; alert(abc1 + ' & ' + abc2); } show_img(); alert(abc1 + '&' + abc2);
  11. 11. var obj = { 1: 'hello', 2: 'world'} obj.1 obj[0] obj[1] obj.2
  12. 12. JSBIN (function() { var a = b = 5; })(); console.log(b);
  13. 13. JSBIN function test() { console.log(a); console.log(foo()); var a = 1; function foo() { return 2; } } test();
  14. 14. var fullname = 'John Doe'; var obj = { fullname: 'Colin Ihrig', prop: { fullname: 'Aurelio De Rosa', getFullname: function() { return this.fullname; } } }; console.log(obj.prop.getFullname()); var test = obj.prop.getFullname; console.log(test()); JSBIN
  15. 15. JSBIN var x = 10; var obj = { x: 20, f: function(){ console.log(this.x); var foo = function(){ console.log(this.x); } foo(); } }; obj.f();
  16. 16. var x = 5; (function(){ alert(x); var x=10; })(); alert(x);
  17. 17. JSBIN for(var i = 0; i < 10; i++) { setTimeout(function() { console.log(i); }, 1000); }

×