CSS Pract-11 Merged
CSS Pract-11 Merged
<html>
<head>
<script>
function openWindow()
</script>
</head>
<body>
<form action="#">
</form>
</body>
</html>
Output:
Code-2:
<html>
<body>
<p>Click the button to open a new window and close the window after three seconds (3000
milliseconds)</p>
<script>
function openWin() {
myWindow.document.write("<p>This is 'myWindow'</p>");
</script>
</body>
</html>
Output:
Code-3:
<!DOCTYPE html>
<html>
<head>
<script>
function myFunction()
myWindow.document.write("<p>This is 'myWin'");
</script>
</head>
<body>
</body>
</html>
Output:
Practical No.12:- Develop a web page for validation of form fields using
regular expressions.
Code-1: Write a JavaScript to test if string contains the letter ‘a’ or ‘c’ or both.
<html>
<body>
<script language="javascript">
re = /[ac]/
if(re.test(input)) {
else {
</script>
</body>
</html>
Output:
Code-2: Develop a program to check for valid email id entered by user.
<html>
<head>
<script>
function checkEmail()
if(!res) {
else {
alert('Thank you')
</script>
</head>
<body>
</form>
</body>
</html>
Output: