RandomGuy32

assembleTableBody()

Feb 22nd, 2016
159
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function assembleTableBody() {
  2.     var amountColumns = (endNum - startNum) / 16;
  3.    
  4.     for (i = 0; i < 16; i++) {
  5.         var rowContent = "\n" + tab(5);
  6.        
  7.         for (j = 0; j <= amountColumns; j++) {
  8.             var cellContent = "&amp;#x" + startNum.toString(16) + ";";
  9.            
  10.             rowContent += (new htmlElement("td", cellContent, "")).s + "\n" + tab(5);
  11.         }
  12.        
  13.         product += tab(4) + (new htmlElement("tr", rowContent, "")).s + "\n";
  14.     }
  15. }
  16.  
  17. function htmlElement(tagName, content, className) {
  18.     this.s = "&lt;" + tagName + ((className == "") ? ("&gt;" + content) : (" class=\"" + className + "\"&gt;" + content)) + "&lt;" + tagName + "&gt;";
  19. }
  20.  
  21. function tab(amount) {
  22.     var result = "";
  23.     for (i = 0; i < amount; i++) {
  24.         result += "\t";
  25.     }
  26.     return result;
  27. }
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×