0% found this document useful (0 votes)
18 views2 pages

pr12

xccdcdsfdssfvdsfesfddsfdsfaefssgfrsfefefqefqwdadafasdsadsaasdassdsd

Uploaded by

Yash raundal
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
18 views2 pages

pr12

xccdcdsfdssfvdsfesfddsfdsfaefssgfrsfefefqefqwdadafasdsadsaasdassdsd

Uploaded by

Yash raundal
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

12.

Develop a web page for validation of form fields using


regular expressions.
<!DOCTYPE html>
<html>

<head>
<title>Raundal Yash Roll No:08</title>
<script type="text/javascript">
function TestString(str) {
re = /[az]/
if (re.test(str)) {
alert("The letter a or z or both are present in the string");
}
else {
alert("string done not contain a or z or both");
}
}
</script>
</head>

<body>
<h2>Example of Regular Expression</h2>
<script type="text/javascript">
var input_str = prompt("Enter Some string here")
TestString(input_str);
</script>
</body>

</html>
*************************************************************************************

You might also like