Advertisement
Aniket_Goku

js4

Apr 22nd, 2021
166
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <html>
  2.     <head>
  3.         <title>js4</title>
  4.     </head>
  5.     <script>
  6.         function  f1()
  7.         {
  8.             var i,n1,n2,j=0,flag=0;
  9.             n1=document.getElementById("c1").value;
  10.             n2=" ";
  11.             for(i=n1.length-1;i>=0;i--)
  12.             {
  13.                 n2+=n1[i];
  14.                
  15.             }
  16.            
  17.                 document.getElementById("state").innerHTML="It is Reverse string :" +n1+" = "+n2;          
  18.            
  19.         }
  20.     </script>
  21.     <style>
  22.         body
  23.         {
  24.             background-image:url("file:///D:/backgrounds/28.jpg");
  25.             background-color:#ffa6a2;
  26.             background-attechment:fixed;
  27.             backdrop-filter:blur(7px);
  28.             height:100vh;
  29.             background-size:100% 100%;
  30.             margin:0;
  31.             padding:0;
  32.             background-repeat:no-repeat;
  33.            
  34.         }
  35.         .s1
  36.         {
  37.             width:100%;
  38.             height:70px;
  39.             border-color:transparent;
  40.             background:black;
  41.             color:white;
  42.             font-size:25px;
  43.            
  44.            
  45.         }
  46.         .s2
  47.         {
  48.             border-radius:0%;
  49.             border-color:red;
  50.             background:black;
  51.             color:white;
  52.             font-size:35px;
  53.            
  54.         }
  55.        
  56.     </style>
  57.     <body   text="White">
  58.         <center>
  59.             <h1 > Checking Reverse String</h1>
  60.             <stamp class="s1" style="background:transparent;color:yellow">*Press tab after giving data*<stamp>
  61.         </center>  
  62.            
  63.         <table border="1" align="center" cellspacing="15" cellpadding="70" width="70%" style="border-color:transparent">
  64.             <form >
  65.                 <tr  >
  66.                     <td >  
  67.                         <input  type="textbox" class="s1"  id="c1" onchange="f1()" placeholder="no1">                          
  68.                            
  69.                     </td>
  70.                 </tr><tr>
  71.                     <td >  
  72.                         <label id="state" class="s2"></label>              
  73.                            
  74.                     </td>
  75.                                        
  76.                 </tr>
  77.                                
  78.             </form>
  79.         </table>
  80.            
  81.     </body>
  82.  
  83. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement