write a JavaScript function in the folling html code that performs the following tasks: Prompt users to enter 12 numbers Find the number of even numbers Display the number of even numbers along with your id as text of the paragraph having the id “output” Change the font color of the paragraph to orange Add the appropriate code to execute the function once the button “Run the function” is clicked. Here is the code: Find the number of even numbers from the 12 values entred by the user The result should be displayed here Run the function The following print screen shows how the web page looks after running the function:
write a JavaScript function in the folling html code that performs the following tasks: Prompt users to enter 12 numbers Find the number of even numbers Display the number of even numbers along with your id as text of the paragraph having the id “output” Change the font color of the paragraph to orange Add the appropriate code to execute the function once the button “Run the function” is clicked. Here is the code: Find the number of even numbers from the 12 values entred by the user The result should be displayed here Run the function The following print screen shows how the web page looks after running the function:
Chapter10: Selected Single-row Functions
Section: Chapter Questions
Problem 20MC
Related questions
Question
- write a JavaScript function in the folling html code that performs the following tasks:
- Prompt users to enter 12 numbers
- Find the number of even numbers
- Display the number of even numbers along with your id as text of the paragraph having the id “output”
- Change the font color of the paragraph to orange
- Add the appropriate code to execute the function once the button “Run the function” is clicked.
Here is the code:
<!DOCTYPE html>
<html>
<script language="javascript" type="text/javascript">
</script>
<body>
<h2>Find the number of even numbers from the 12 values entred by the user</h2>
</br>
<p id="output" style="color:blue">The result should be displayed here</p>
<button >Run the function</button>
</body>
</html>
- The following print screen shows how the web page looks after running the function:
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 2 steps with 3 images
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Recommended textbooks for you
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:
9781337102124
Author:
Diane Zak
Publisher:
Cengage Learning
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:
9781337102124
Author:
Diane Zak
Publisher:
Cengage Learning
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT