Advertisement
Guest User

Untitled

a guest
Oct 23rd, 2014
125
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. var x = prompt("Object?");
  2. x = x.toLowerCase();
  3.  
  4. if (x === "window") {
  5. x = window;
  6. load_table();
  7. } else if (window[x]) {
  8. x = window[x];
  9. load_table();
  10. } else if (x[0] === "t" && x[1] === "h" && x[2] === "i" && x[3] === "s" && x[4] === ".") {
  11. x = x.split('.');
  12. x = x[1];
  13. load_table();
  14. } else {
  15. document.write("Error Message.");
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement