Q.no 12 & 16 :- checkout in web long answer question page .
Q.no 11
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
Question :- Write a JavaScript program to add numbers of list. //BIM Study Notes <html> <head> <script> function add(){ var a,b,c; a=Number(document.getElementById("first").value); b=Number(document.getElementById("second").value); c= a + b; document.getElementById("answer").value= c; } </script> </head> //BIM Study Notes <body> Enter the First number : <input id="first"><br /> Enter the Second number: <input id="second"><br /> <button onclick="add()">Add</button> <input id="answer"> </body> </html> //BIM Study Notes |
Q.no 13
1 2 3 4 5 6 7 8 9 10 11 12 13 |
<!DOCTYPE html> <html> <head> <title></title> </head> <body> <script type="text/javascript"> var string="yashu"; var revString=string.split("").reverse().join(""); alert(revString); </script> </body> </html> |
Q.no 14
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 |
<!DOCTYPE html> <html> <head> <title></title> </head> <body> Name: <br> <input type="text" id="user"> Address: <br><input type="text" id="add"> Email: <br> <input type="email" id="email"> Password: <br> <input type="passwod" id="password"> <script type="text/javascript"> function validate() { var a=document.getElementById('user').value; var b=document.getElementById('add').value; var c=document.getElementById('email').value; var d=document.getElementById('password').value; var isSuccess=1; //Patter for email var emailPattern=/^[a-z]\S+\@\S+\.\S+/; var checkEmail=emailPattern.test(c); if(a==''||b==''||c==''||d=='') { alert("Fields Cant be Empty"); isSuccess=0; } if(checkEmail!=true) { alert("Enter the valid email pattern"); isSuccess=0; } if(d.password<6) { alert("Password must be more than 7 characters"); isSuccess=0; } if(isSuccess==1) { alert("Successfully Login"); } } </script> </body> </html> |
Q.no 15 checkout image in question paper section.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 |
//BIM Study Notes In HTML file: <html> <head> <title>without using table tag</title> <link rel="Stylesheet" type="text/css" href="div.css"> </head> <body> <div class="one"> <h1>div1</h1> </div> <div class="two"> <h1>div2</h1> </v> <div class="third"> <h1>div3</h1> </div> <div class="fourth"> <h1>div4</h1> </div> <div class="fifth"> <h1>div5</h1> </div> </body> </html> //BIM Study Notes In CSS file: div{ border-style:solid; border-width:5 px; } .one { height:50px; width:200px; } .two { position:relative; height:206px; width:100px; left:205px; top:-56px; } .third { position:absolute; height:50px; width:100px; top:62px; } .fourth { position:relative; height:50px; width:100px; left:102px; bottom:215px; } .fifth { position:absolute; height:100px; width:200px; top:115px; } //BIM Study Notes |