daily pastebin goal
78%
SHARE
TWEET

assembleTableBody()

RandomGuy32 Feb 22nd, 2016 (edited) 79 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
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top