Advertisement
Guest User

Untitled

a guest
Nov 24th, 2017
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.92 KB | None | 0 0
  1. // Exercise 2.3 Javascript file //
  2. // Read the instructions.html //
  3.  
  4. //some helpful debug code
  5.  
  6. $("#javascript_start").html("[OK] Started executing the javascript file");
  7. $("#javascript_end").html("[WAITING]...this far we haven't reached the end... Maybe you should try FireBug?");
  8.  
  9. // ADD YOUR CODE BETWEEN THESE LINES //
  10.  
  11. var lista = document.getElementById("ul");
  12. var linkki = nums.getElementByTagName("li");
  13.  
  14.  
  15.  
  16. for (var i = 0; i<linkki.length; i++)
  17. {
  18.  
  19. var a = linkki.split(.) // www facebook fi
  20. if (a[a.length-1] =='pdf')
  21. {
  22. // pdf
  23. }
  24. else if ([a.length > 1] && (a[a.length-1] && (a[a.length-1]!=('html') ))
  25. {
  26. //download
  27. }
  28. else{
  29. // external
  30. }
  31. }
  32.  
  33.  
  34.  
  35.  
  36.  
  37.  
  38.  
  39. // ADD YOUR CODE BETWEEN THESE LINES //
  40.  
  41. //some helpful debug code
  42.  
  43. $("#javascript_end").html("[OK] The end of your javascript file was reached. (meaning there were no huge errors) Hopefully your code works too! ");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement