Practical No.
12
I. Title: . Develop a web page for validation of form fields using regular expressions.
II. Theory:
1) What is Regular Expression? Write syntax of regular expression.
2) State following terms:
a) Pattern using Brackets
b) Modifiers
c) Metacharacters
d) Quantifiers
e) Methods
f) RegExp Object Properties
III. Exercise:
1) Create a form with input fields as Name, Employee Id, Email Id, Mobile
Number and one submit button. When user clicks on submit button validate
all data entered by using regular expression.
(Note: Format of Employee Id is EMP191120)
2) Write javascript code to demonstrate exec(), match(), test(), replace(),
search(). Given string is “Java and javascript are the programming languages.
But java is different than javascript”. Given pattern is “/java/”. Write output
of each function.
3) Create following frame.
Frame 1 Frame 2
Frame 2
Frame 3
Frame 3
When user clicks on Frame 2 link then content of Frame 2 should be
displayed in Frame 1. When User clicks on Frame 3 link then redirect Frame
3 to google page.
4) Write javascript program to demonstrate image and text rollover.
IV. Conclusion: (Write conclusion here)
Marks Obtained Dated Signature of
Teacher
Process Product Total
Related(10) Related(15)