Practical 2

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 7

Practical 2.

HTML
<!-- Shaikh Abdullah -->
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <script src="if.js" defer></script>
    <title>Document</title>
</head>
<body>
    <h4>
        Shaikh Abdullah 1705690080
    </h4>
    <div>
        Username <input type="text" id="t1">
    </div>
    <div>
        Password <input type="text" id="t2">
    </div>
    <button onclick="check()">LOGIN</button>
</body>
</html>

JAVASCRIPT
// 2005690066
-

OUTPUT
Practical 2.2

HTML
<!-- Shaikh Abdullah -->
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <script src="switch.js" defer></script>
    <title>Document</title>
</head>
<body>
    <h4>
        Shaikh Abdullah 1705690080
    </h4>
    <input type="text" id="num">
    <button onclick="check()">Check</button>
</body>
</html>

JAVASCRIPT
// 1705690080
function check(){
    t1 = document.getElementById("num");
    ch = parseInt(t1.value);
    switch(ch){
            case 1:
            alert("You've Entered 1");
            break;
            case 2:
            alert("You've Entered 2");
            break;
            case 3:
            alert("You've Entered 3");
            break;
            case 4:
            alert("You've Entered 4");
            break;
            case 5:
            alert("You've Entered 5");
            break;
            case 6:
            alert("You've Entered 6");
            break;
            case 7:
            alert("You've Entered 7");
            break;
            case 8:
            alert("You've Entered 8");
            break;
            case 9:
            alert("You've Entered 9");
            break;
            case 10:
            alert("You've Entered 10");
            break;
            default:
            alert("Invalid Number");
    }
}

OUTPUT
Practical 2.3
HTML
<!-- Shaikh Abdullah -->
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <script src="vowels.js" defer></script>
    <title>Document</title>
</head>
<body>
</body>
</html>

JAVASCRIPT
// 1705690080
A =
['a','b','c','d','e','f','g','h','i','j','k','l','m',,'n','o','p','q','r','s'
,'t','u','v','w','x','y','z'];

for(i in A){
    if(A[i]=='a' || A[i]=='e' || A[i]=='i' || A[i]=='o' || A[i]=='u' ){
        continue;
    }
    console.log(A[i]);
}

OUTPUT

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy