Use app×
Join Bloom Tuition
One on One Online Tuition
JEE MAIN 2025 Foundation Course
NEET 2025 Foundation Course
CLASS 12 FOUNDATION COURSE
CLASS 10 FOUNDATION COURSE
CLASS 9 FOUNDATION COURSE
CLASS 8 FOUNDATION COURSE
+1 vote
357 views
in Enterprise Resource Planning by (30.5k points)
closed by

Design an HTML page that contains a text box to enter the marks in a given subject.

(a) Write HTML code for this web page 

(b) Provide validations for this text box in a separate JavaScript file and link it with the HTML file. 

The validations are 

  • it should not be empty 
  • it should be a number 
  • it should be between 0 and 60. 

(c) List the advantages of writing the script in a separate file.

1 Answer

+1 vote
by (30.4k points)
selected by
 
Best answer

(b) Step 1. Take a Notepad and type the following and save it as check.js.

function checkData()

{

Step 2. Take another Notepad and type the following and save it as valid.html and execute valid.html file.

(c) We can write scripts in a file and save it as a separate file with the extension .js. The advantage is that this file can be used across multiple HTML files and can be enhance the speed of page loading

Welcome to Sarthaks eConnect: A unique platform where students can interact with teachers/experts/students to get solutions to their queries. Students (upto class 10+2) preparing for All Government Exams, CBSE Board Exam, ICSE Board Exam, State Board Exam, JEE (Mains+Advance) and NEET can ask questions from any subject and get quick answers by subject teachers/ experts/mentors/students.

Categories

...