<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Barra Gialla Fissa</title> <style> body { margin: 0; font-family: Arial, sans-serif; } header { background-color: yellow; color: black; padding: 10px 0; text-align: center; position: fixed; width: 100%; top: 0; z-index: 1000; } table { width: 100%; margin-top: 50px; color:#0C6; background-color:#6FF; } th, td { border: 1px solid black; padding: 8px; } </style> </head> <body> <header> Barra Gialla Fissa </header> <table> <tr> <th>A</th> <th>B</th> <th>C</th> <th>D</th> <th>E</th> <th>Totale</th> </tr> <script> var Mytot = 0; var totalA = 0; var totalB = 0; var totalC = 0; var totalD = 0; var totalE = 0; for (var i = 1; i <= 100; i++) { totalA += i; totalB += i; totalC += i; totalD += i; totalE += i; Mytot = i * 5; document.write("<tr>"); document.write("<td>" + i + "</td>"); document.write("<td>" + i + "</td>"); document.write("<td>" + i + "</td>"); document.write("<td>" + i + "</td>"); document.write("<td>" + i + "</td>"); /*document.write("<td>" + (totalA + totalB + totalC + totalD + totalE) + "</td>"); */ document.write("<td>" +Mytot + "</td>"); document.write("</tr>"); } </script> </table> </body> </html> |