javascript牛题(javascript牛题).docVIP

  • 2
  • 0
  • 约3.55千字
  • 约 10页
  • 2017-08-31 发布于河南
  • 举报
javascript牛题(javascript牛题)

javascript牛题(javascript牛题) Scoring principle: 12 topics, 1 - 10, entitled fill in the blanks, each of the questions 8 points, 11---12 programming questions, each of 10 points, total score of 100 points 1 (fill in the blanks) what are the following code execution results? ul id= demo lia/li lib/li lic/li /ul script type= text/javascript Var UL = document.getElementById (demo); Var liList = ul.getElementsByTagName (li); For (VaR I = 0; I liList.length; ++i) { Ul.removeChild (liList[i]); } /script 2, (fill in the blanks) what are the results of the following two sections of code?: script type= text/javascript VaR, YX01 = new, function (), {return, test,}; Alert (YX01); VaR, YX01 = new, function (), {return, new, String (` test )}; Alert (YX01); /script 3. Whats the value of the following code? script type= text/javascript Function, testFunction () { Var args_1 = Array.prototype.slice.call (arguments, 1, 2); //var args_2 = Array.prototype.splice.call (arguments, 0, arguments.length); //alert (args_1 + \n + args_2); } TestFunction (1,2,3); /script 4 (fill in the blanks), click on the following A, B, C, D four links, respectively, what results? div id= demo a href= # A/a a href= # B/a a href= # C/a a href= # D/a /div script type= text/javascript Var addHandlers = function (nodes) { For (VaR I = 0; I nodes.length; ++i) { Nodes[i].onclick = function (EV) { Alert (I * 100); } } } AddHandlers (document.getElementById (demo).GetElementsByTagName (a)); /script 5, (fill in the blanks) the following code, the implementation of the final results: script type= text/javascript Var Obj = {}; Obj.abc = = undefined; Undefined =Hello, world; Obj.abc =Hello, world; Alert (Obj.abc = undefined); /script 6 (fill in the blanks) what are the following lines and values?: script type= text/javascript Var a = b = C = D = e = f = 1; Alert (a++); Alert (++b); Alert (+ C); Alert (D + +); Alert (+ +e); Alert (+ + F); /script script type= text/javascript Alert ( = =0); Alert ( = = false);

您可能关注的文档

文档评论(0)

1亿VIP精品文档

相关文档