Question
Asked Dec 12, 2019
21 views

Provide the code to create an input box for a data field named custPassword, with an input type suitable for a field containing password data.

Please answer in javascript

check_circle

Expert Answer

Step 1

The code and explanation to create an input box for a data field named custPassword of password type are given below:

Explanation:

  • Creating the HTML document.
  • Inside the head section, <script> tag is used to define a JavaScript.
  • Defining a function, declaring the variable and assigning the value.
  • If statement to check the password filed is not empty.
  • Closing the tags.
  • Inside the <body> section creating a form and inside <form> , creating the input data filed to store password.
  • Creating the submit button.
  • Closing the tags.
Step 2

Code:

<!DOCTYPE html>

<html>

<head>

<script>

//function name

function validation()

{

            //declaring the variable

    //and assigning the value

            var x = document.forms["Form"]["custPassword"].value;

    //if statement to check the password field is blank

    if (x == "")

            {

            //alert box to show message if password field is blank

            alert("Password field can't be...

Want to see the full answer?

See Solution

Check out a sample Q&A here.

Want to see this answer and more?

Solutions are written by subject experts who are available 24/7. Questions are typically answered within 1 hour.*

See Solution
*Response times may vary by subject and question.
Tagged in

Engineering

Computer Science

Related Computer Science Q&A

Find answers to questions asked by student like you
Show more Q&A
add
question_answer

Q: Write a program that first gets a list of integers from input. The input begins with an integer indi...

A: Source Code#include &lt;iostream&gt;#include&lt;vector&gt;using namespace std;/* Define your functio...

question_answer

Q: privacy and data protection in mobile applications.

A: Privacy design strategies in mobile device:Minimize the usage – limit the processing of personal dat...

question_answer

Q: To be done in C++ The only part I need done is the portion where it reads an existing students txt a...

A: Programming Instructions:Create a structure with the name ‘student’ and declare all required variabl...

question_answer

Q: Find the complement of the following expressions a) (x+y’+z)(x’+z’)(x+y) b) (AB’+C)D’+E

A: a)Given expression:

question_answer

Q: Draw a NAND logic diagram that implements the complement of the following function: (AB+A’B’)(CD’+C’...

A:  Logic diagram:

question_answer

Q: Define a two-dimension array with 10 rows and 2 columns in java does this look correct? I think I am...

A: The following are the mistakes in the code –The integer j is not declared.The braces are not closed ...

question_answer

Q: analyze each program and figure out what is wrong with the memory management in the code and how to ...

A: In this program malloc() function is used to allocate memory.malloc() syntax:pointer= (cast-type*) m...

question_answer

Q: What is an example of a query that is based on the tables (attached)  and includes both an arithmeti...

A: Query:SELECT COURSE.COURSE_TITLE, COURSE.COURSE_DESCRIPTION, COURSE.COURSE_TYPE_CODE FROM COURSE INN...

question_answer

Q: - Delete the employee who has the longest employment in the company

A: The longest employment in the company must have minimum HIREDATE so that to delete this employee dat...