Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Exercise 2.3 Javascript file //
- // Read the instructions.html //
- //some helpful debug code
- $("#javascript_start").html("[OK] Started executing the javascript file");
- $("#javascript_end").html("[WAITING]...this far we haven't reached the end... Maybe you should try FireBug?");
- // ADD YOUR CODE BETWEEN THESE LINES //
- var lista = document.getElementById("ul");
- var linkki = nums.getElementByTagName("li");
- for (var i = 0; i<linkki.length; i++)
- {
- var a = linkki.split(.) // www facebook fi
- if (a[a.length-1] =='pdf')
- {
- // pdf
- }
- else if ([a.length > 1] && (a[a.length-1] && (a[a.length-1]!=('html') ))
- {
- //download
- }
- else{
- // external
- }
- }
- // ADD YOUR CODE BETWEEN THESE LINES //
- //some helpful debug code
- $("#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