Question

5 -​Create a web page that contains JavaScript code as discussed in class. ​Your page should...

5 -​Create a web page that contains JavaScript code as discussed in class.
​Your page should use the defaults for color, font face and font size.
​Count the numbers from 1 to 50. Skip 1 blank space between each value. You must use a ​for() loop

Homework Answers

Answer #1

Below is the html Code for required webpage , in below code no CSS applied as it uses default webpage styles:-

<!DOCTYPE html>
<html>
<body>
<!-- count values will add in below paragraph element -->
<p id="count"></p>

</body>
<script type="text/javascript">
window.onload = function() {
//below loop count the numbers from 1-50 and show in webpage element
    for (var i = 1; i <= 50; i++) {
        document.getElementById("count").append(i+" ");
}

};
  
</script>
</html>

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
3. Write a JavaScript code that print 3 color (yellow, black, red). You should create an...
3. Write a JavaScript code that print 3 color (yellow, black, red). You should create an array that has all the color then use a loop to print the array.
Create a web page as follows: Title is "Fun With Links" Body background color is cyan...
Create a web page as follows: Title is "Fun With Links" Body background color is cyan The margin for the body should be 10% The font-size for the body should be 2em A Heading 1 tag contain the phrase Education is Key A paragraph with the sentence Quincy College is best in class. The last part of the sentence "best in class" should be a hyperlink to the URL https://quincycollege.edu/bestinclass/
8- Develop a personal web page for yourself using HTML, CSS, and Javascript Use the following...
8- Develop a personal web page for yourself using HTML, CSS, and Javascript Use the following HTML tags to design your webpage <h1>…</h1> , <h3>… </h3> , <h6>… </h6> , <p>…</p> , <b> …</b> , <i>…</ i>, <a…..> </a>, <img…..> , <table>….</table> , <div> …</div>, <form>…</ form>, <input type=“text”>, and <input type=“submit”> Use an external css to change the default style of your webpage. You must use at least one element selector, one id selector, and one class selector Using...
Use visual studio code to write the javascript programme. For this lab you must use a...
Use visual studio code to write the javascript programme. For this lab you must use a reasonable faceted search example, each item must have at least three categorical attributes and at least one numeric attribute. Attributes such as ID, name etc do not count as categorical or numeric attributes. (a) Define a class for your item that meets the above three categorical and one numeric attribute requirements. (b) Create a text file that contains at least 5 such records in...
Use visual studio code to write the javascript programme. For this lab you must use a...
Use visual studio code to write the javascript programme. For this lab you must use a reasonable faceted search example, each item must have at least three categorical attributes and at least one numeric attribute. Attributes such as ID, name etc do not count as categorical or numeric attributes. (a) Define a class for your item that meets the above three categorical and one numeric attribute requirements. (b) Create a text file that contains at least 5 such records in...
PART B- Javascript Using a text editor (VS Code or Notepad) and a web browser, you...
PART B- Javascript Using a text editor (VS Code or Notepad) and a web browser, you will demonstrate how to create an HTML file, externally link a JavaScript file, and write some source code in the JavaScript file. a..Create two blank files to be an HTML file and a JavaScript file. The file names should be partA.html and partA.js. b.. Create a basic HTML webpage structure. c..Link the JavaScript file to the HTML file using the <script> tag. d.. Prompt...
Need this done using PHP code and not javascript Create a PHP form with a textarea...
Need this done using PHP code and not javascript Create a PHP form with a textarea field input and a submit button. The textarea field should be able to accept up to 250 characters. When the user clicks the Submit button, read the text in the textarea and display the following results on a web age. At the bottom of the page include a link back to the form. Number of characters: Number of words: (hint: explode the string into...
html/php 1. Create an html page (with an html file ending) that contains a form. This...
html/php 1. Create an html page (with an html file ending) that contains a form. This form will accept a number from the user. The form will then send this number to the assignment3.php program by using either GET or POST. 2. The assignment3.php program will read the value in the textbox and place it into the variable "myvalue". The program will then use either a switch statement or IF/THEN/ELSE statement to determine if the value entered is within 10...
In c++ create a class to maintain a GradeBook. The class should allow information on up...
In c++ create a class to maintain a GradeBook. The class should allow information on up to 3 students to be stored. The information for each student should be encapsulated in a Student class and should include the student's last name and up to 5 grades for the student. Note that less than 5 grades may sometimes be stored. Your GradeBook class should at least support operations to add a student record to the end of the book (i.e., the...
TASK 2: Open numberic-variable_problem.js file in a text editor (e.g., NotePad++). What is the syntax error...
TASK 2: Open numberic-variable_problem.js file in a text editor (e.g., NotePad++). What is the syntax error in the JavaScript file? Find error message in console in a browser’s developer tool. Fix that error and reload the web page in browser. What is the change in the content displayed in the web page after fix the syntax error in the JavaScript code? Replace the line#18 statement (el.textContent = '$' + total;) in the JavaScript code with    el.textContent = '$' + total.toFixed(3);...