Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html>
- <head>
- <title>js6</title>
- </head>
- <script>
- function f1()
- {
- var i,ch,n1,n2;
- n1=parseInt(document.getElementById("c1").value);
- n2=parseInt(document.getElementById("c2").value);
- if (isNaN(n1) || isNaN(n2) )
- {
- if (isNaN(n1))
- {
- document.getElementById("c1").focus();
- }
- if (isNaN(n2))
- {
- document.getElementById("c2").focus();
- }
- ch="Check Data";
- }
- else
- {
- ch=parseInt(n1*n2);
- }
- document.getElementById("c3").value=ch;
- }
- </script>
- <style>
- body
- {
- background-image:url("file:///D:/backgrounds/41.png");
- background-color:skyblue;
- background-attechment:fixed;
- backdrop-filter:blur(7px);
- height:100vh;
- background-size:100% 100%;
- margin:0;
- padding:0;
- background-repeat:no-repeat;
- }
- .style1
- {
- background:yellow;
- border-radius:20%;
- font-size:20px;
- }
- .s2
- {
- border-radius:0%;
- border-color:red;
- background:black;
- color:white;
- font-size:17px;
- }
- </style>
- <body text="White">
- <center>
- <h1 > Multiply</h1>
- </center>
- <table border="0" align="center" cellspacing="20" cellpadding="70" width="30%">
- <form >
- <tr>
- <td> <input type="textbox"class="s2" id="c1" onchange="f1()" placeholder="No1"></td>
- <td> <input type="button"class="style1" value="X"></td>
- <td> <input type="textbox"class="s2" id="c2" onchange="f1()" placeholder="No2" ></td>
- <td> <input type="submit" class="style1" value="=" ></td>
- <td> <input type="textbox" class="s2" id="c3" placeholder="Ans" ></td>
- </tr>
- </form>
- </table>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement