1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
butalik [34]
3 years ago
8

Fill the validateForm function to check that the phone number contains a number (use the isNaN function) and that the user name

is less than 11 characters long. Display "Phone number is invalid" and/or "User name is invalid" in the console log if the check does not pass. Use the preventDefault function to avoid submitting the form when the inputs are invalid.
html code:


Username:







JAVA:

var form = document.getElementById("userForm");

function validateForm(event) {
var phoneNumber = form.phoneNumber.value;
var userName = form.userName.value;

/* Your solution goes here */

}

form.addEventListener("submit", validateForm);

Computers and Technology
1 answer:
Wittaler [7]3 years ago
8 0

The answer & explanation for this question is given in the attachment below.

You might be interested in
Select the true statement about HTML. HTML is a language that is used to create Web pages. HTML tags tell a web browser when to
Alexxx [7]

Answer: HTML is a language that is used to create Web pages.

Explanation:

HTML (Hypertext Markup Language) simply refers to the code which is used for the structuring of a web page and its content. e.g the content can be structured by using images, in data tables or within a set of paragraphs.

Therefore, the correct statement about HTML is that HTML is a language that is used to create Web pages.

6 0
3 years ago
Read 2 more answers
Which of the following statements is false? Data is lost when a local variable "goes out of scope." Data maintained in files is
Veronika [31]

Answer:

The false statement is "Data maintained in files is often called transient data".

Explanation:

In computer programming, transient data is a temporary storage to hold the value which is created within an application session. The transient data will be discarded at the end of the program. The transient data will be reset to its default value when running the program again.  In contrast, file is known as a persistent storage which will still hold data even after end of a program. This is the reason the statement "Data maintained in files is often called transient data" is contradictory and therefore is considered a false statement.

5 0
3 years ago
I need ur oppinion about this paragraph.
choli [55]

I think that this answer is amazing and nothing really needs to be added. Well Done!

5 0
3 years ago
Read 2 more answers
Given the Query Data Type, which of the following is incorrectly matched with the corresponding Storage Data Type?
Tamiku [17]

Answer:

<h2>c) Date : Date</h2>

Explanation:

A type of attribute of data is called data type in computer science, data types tells the interpreter how a person wants to use the data. The basic data types are supported by most of the programming languages, the basic data types are Integers, float, characters, strings, point numbers and arrays. The terminology may differ from one language to other.

3 0
3 years ago
Which best explains the process he would follow?
nikitadnepr [17]
I think the answer is c. I just did that edginunity
7 0
4 years ago
Other questions:
  • Pages with obvious problem with functionality or errors in displaying content
    11·1 answer
  • What statement needs to be included below to retrieve all rows from the Invoices table with InvoiceTotal greater than 100?
    9·1 answer
  • In the receiving computer, UDP receives a datagram from the __________ layer.
    15·1 answer
  • Write a function that creates a one-dimensional game board composed of agents of two different types (0 and 1, X and O, stars an
    11·1 answer
  • In what kind of attack can attackers make use of millions of computers under their control in an attack against a single server
    6·1 answer
  • Can someone come and see if I have answered this question correctly? Please ...
    10·2 answers
  • In what situation is a read receipt notification not sent when an email is opened or previewed bya recipient?
    8·2 answers
  • Bob is having no luck performing a penetration test on Retail Store's network. He is running the test from home and has download
    6·1 answer
  • Lesson 12: while loops with the farmer. Number 9.
    10·2 answers
  • Lucy is trying to decide what sources to use in her literature review. The type of sources Lucy will use in her literature revie
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!