Dynamic Table Generator
How do I make an dynamic table generator?
What is a dynamic table generator? How do you make a dynamic table generator? This script and codes were developed by Miguel Ferreira on 26 January 2023, Thursday.
Dynamic Table Generator - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Dynamic Table Generator</title> <link rel='stylesheet prefetch' href='http://ajax.googleapis.com/ajax/libs/jqueryui/1.11.2/themes/smoothness/jquery-ui.css'> <link rel="stylesheet" href="css/style.css">
</head>
<body> <span id="cols">Columns:</span>
<select id="coluna"> <option disabled selected>Select</option> <option>0</option> <option>1</option> <option>2</option> <option>3</option> <option>4</option> <option>5</option> <option>6</option> <option>7</option> <option>8</option> <option>9</option> <option>10</option>
</select>
<span class="ros">Rows:</span>
<select id="fila"> <option disabled selected>Select</option> <option>0</option> <option>1</option> <option>2</option> <option>3</option> <option>4</option> <option>5</option> <option>6</option> <option>7</option> <option>8</option> <option>9</option> <option>10</option>
</select>
<button class="criar">Generate</button>
<table id="tabelas"></table> <script src='http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script>
<script src='http://ajax.googleapis.com/ajax/libs/jqueryui/1.11.2/jquery-ui.min.js'></script> <script src="js/index.js"></script>
</body>
</html>
Dynamic Table Generator - Script Codes CSS Codes
body{ background:oldlace; font-family: "Eurostile LT Std";
}
select{ margin-right:40px; width:80px; height:50px; border:0px solid;
}
td, th, table { border: solid 1px; padding: 5px;
}
Dynamic Table Generator - Script Codes JS Codes
$(document).ready(function () { String.prototype.repeat = function(n) { return new Array(n + 1).join(this); } $('.criar').click(function () { $('table').empty(); var col = parseInt($('#coluna').val()); var row = parseInt($('#fila').val()); var head = "<th>Heading</th>".repeat(row); var tableHead = "<tr>" + head + "</tr>" var tableData = "<td>Cookies</td>".repeat(row); var tableRow = "<tr>" + tableData + "</tr>"; var table = tableRow; $('#tabelas').append(tableHead); for (i = 0; i < col; i++) { $('#tabelas tr:last').after(table); } });
})
Developer | Miguel Ferreira |
Username | angus |
Uploaded | January 26, 2023 |
Rating | 3 |
Size | 2,159 Kb |
Views | 4,048 |
Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!
Name | Size |
Calculator | 1,897 Kb |
A Pen by Miguel Ferreira | 2,078 Kb |
Hover menu CSS | 2,020 Kb |
Comparing values to items in array | 1,841 Kb |
Images hover with zoom effect | 1,751 Kb |
DropDown Menu | 1,867 Kb |
Slider | 2,170 Kb |
Basic Caroussel Concept | 5,233 Kb |
Prespectives | 2,103 Kb |
Slider modelo | 2,391 Kb |
Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!
Name | Username | Size |
Material design buttons | Fischaela | 4,381 Kb |
Kudos Please | TimPietrusky | 6,624 Kb |
Simple blog concept | Drew_mc | 2,666 Kb |
Cofee and sugar | Tripack | 2,094 Kb |
Two joint circles - One element | Berdejitendra | 1,704 Kb |
A Pen by Brendan Skousen | Bskousen | 2,954 Kb |
AngularJS Datalist Directive | M-e-conroy | 2,366 Kb |
SlideDown FixedMenu | Mp_graphic | 5,602 Kb |
Flickering Light Text Effect | Mandymichael | 3,315 Kb |
Flexbox playground | Enxaneta | 5,418 Kb |
Surf anonymously, prevent hackers from acquiring your IP address, send anonymous email, and encrypt your Internet connection. High speed, ultra secure, and easy to use. Instant setup. Hide Your IP Now!