Design a webpage that accepts as input a number 1-10 (call it
n), and after a user clicks a button “Generate”, it will
generate an n x n grid with alternating red and black colors (like
a checkerboard). Each cell should be labelled (captioned)
“i, j” where i represents the row number and j represents the
column number (e.g. it should say “5, 3” for the cell in row
5,
column 3). Moreover, if a user clicks on the cell, the label
(caption) will disappear.
Additional design and implementation instructions:
Use a combination of HTML, CSS, and Javascript as
appropriate
Your HTML should be complete (include all appropriate header
information)
Your board should make maximum use of the available
screensize
The boxes should be actual squares (not default table cells)
<HTML>
<HEAD>
<TITLE>Dynamically add Textbox in html Form using
JavaScript</TITLE>
<SCRIPT language="javascript">
function generate() {
var a,i,j;
a=Number(document.getElementById("n").value);
var foo = document.getElementById("fooBar");
document.write("<br>");
document.write("<br>");
var color=0;
for (i = 0; i < a; i++) {
for (j = 0; j < a; j++){
//Create an
input type dynamically.
var element =
document.createElement("input");
if(color%2==1
&& a%2==1){
element.setAttribute("style", "color:
#FFFFFF;background-color: #000000;");
}
else
if(color%2==0 && a%2==1){
element.setAttribute("style", "color:
#FFFFFF;background-color: #FF0000;");
}
else if(a%2==0
&& i%2==0 && j%2==1){
element.setAttribute("style", "color:
#FFFFFF;background-color: #000000;");
}
else if(a%2==0
&& i%2==0 && j%2==0){
element.setAttribute("style", "color:
#FFFFFF;background-color: #FF0000;");
}
else if(a%2==0
&& i%2==1 && j%2==0){
element.setAttribute("style", "color:
#FFFFFF;background-color: #000000;");
}
else if(a%2==0
&& i%2==1 && j%2==1){
element.setAttribute("style", "color:
#FFFFFF;background-color: #FF0000;");
}
//Assign different attributes to the element.
element.setAttribute("type", "text");
element.setAttribute("name", "text");
element.setAttribute("size", "2");
element.setAttribute("placeholder", "("+i+","+j+")");
document.body.appendChild(element);
color++;
}
document.write("<br>");
}
}
</SCRIPT>
</HEAD>
<BODY>
Enter a number(1-10) : <input
id="n"><br>
<button
onclick="generate()">Generate</button><br><br><br>
</BODY>
</HTML>
output:


Design a webpage that accepts as input a number 1-10 (call it n), and after a...
Design a webpage that accepts as input a number 1-10 (call it n), and after a user clicks a button “Generate”, it will generate an n x n grid with alternating red and black colors (like a checkerboard). Each cell should be labelled (captioned) “i, j” where i represents the row number and j represents the column number (e.g. it should say “5, 3” for the cell in row 5, column 3). Moreover, if a user clicks on the cell,...
/***************************************************
Name:
Date:
Homework #7
Program name: HexUtilitySOLUTION
Program description: Accepts hexadecimal numbers as input.
Valid input examples: F00D, 000a, 1010, FFFF, Goodbye, BYE
Enter BYE (case insensitive) to exit the program.
****************************************************/
import java.util.Scanner;
public class HexUtilitySOLUTION {
public static void main(String[] args) {
// Maximum length of input string
final byte INPUT_LENGTH = 4;
String userInput = ""; // Initialize to null string
Scanner input = new Scanner(System.in);
// Process the inputs until BYE is entered
do {...
For milestone #1, we will start the CARIT site with three static HTML pages and a CSS file. Create a dedicated folder for this project. This folder should contain all related files in this project. The future milestones are cumulative and built directly on top of your prior work. Function/content requirements: A home page named “index.html”, which include these contents at least: Description of the center. You may reference the example sites. Latest news: use list tags; make up some...
I need HELP to get the code to do these
function: If I keep clicking "Generate" multiple times, the list
keeps on getting bigger. The number of rows should always be equal
to the number of columns. Also make the code to show both table at
the same time?
Here is the code I got some far :
Code:
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,
initial-scale=1, shrink-to-fit=no">
<title>Testing</title>
<link rel="stylesheet"
href="https://stackpath.bootstrapcdn.com/bootstrap/4.2.1/css/bootstrap.min.css"
integrity="sha384-GJzZqFGwb1QTTN6wy59ffF1BuGJpLSa9DkKMp0DgiMDm4iYMj70gZWKYbI706tWS"
crossorigin="anonymous">
</head>
<style>
td...
Subject. Internet & web design technology
I need the questions number.
27, 28, 29,30,35,,37,39 , 40,43,45,49,50
Please send me the correct answer
The last page have 43,45,49,50
We were unable to transcribe this imageprotocol (32) t an application attempts to send a UDP do? message that exceeds the Maximum Transmission Unit (MTU), what will the Ip d) compress it le) expand MTU (b) truncate it (c) fragment n (a) reject it (33] Which is not true of the Transmission Controil...
6.15 Program 6: Using Arrays to Count Letters in Text 1. Introduction In this program, you will practice working with arrays. Your program will read lines of text from the keyboard and use an array to track the number of times each letter occurs in the input text. You will use the contents of this array to generate a histogram (bar graph) indicating the relative frequencies of each letter entered. Test cases are available in this document. Remember, in addition...
You need not run Python programs on a computer in solving the following problems. Place your answers into separate "text" files using the names indicated on each problem. Please create your text files using the same text editor that you use for your .py files. Answer submitted in another file format such as .doc, .pages, .rtf, or.pdf will lose least one point per problem! [1] 3 points Use file math.txt What is the precise output from the following code? bar...