This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
4.web page to display 3 textboxes and applay at least 4 different styles to each textbox using Style attribute.<html><head> <title>text box using style attributes</title> <meta http-equiv="content-type" content="text/html;charset=UTF-8" /></head><body> <h1>text box using style attributes</h1>
6.Employee information form ,when the information is submitted, message should be displayed.<html><head> <title></title> </head><body><form method="post" action="http//:www.osmania.com/evr/bcom"> EMPLOYEE NAME :<input type="text" size="20"><br> FATHER NAME:<input type="text" size="20"><br> ADDRESS:<input type="text" size="20"><br> Date Of Birth:<input type="text" size="20" value="dd/mm/yyyy"></input><br> Gender:<input type="radio">male <input type="radio">femal<br> Company Name:<input type="text" size="20"><br> DESG:<input type="text" size="20"><br> SALARY:<input type="text" size="20"><br> <input type="submit" name="submit" value="submit"> <input type="reset" value="reset"></input></form></body></html>
12.vbscript program to find sum of digits of a given number
<html><head> <title></title></head><body><script language="vbscript">dim n,d,sumsum=0n=inputbox("enter a value")while(n>0) d=n mod 10 sum=sum+d n=n/10 wend msgbox sum</script></body></html>
13. vbscript program on select case to find the value of two numbers from +,-,*,/,%(MOD).
<html><head> <title></title> </head><body><script language="vbscript"> Dim a,b,c,d a=inputbox("enter a value") b=inputbox("enter a value") c=inputbox("enter + - * / % value")select case c case "+" msgbox(a+b) case "-" msgbox(a-b) case "*" msgbox(a*b) case "/" msgbox(a/b) case "%" msgbox(a MOD b) End select</script></body></html>
<html><head> <link rel="stylesheet" href="ex.css"> </head><body><h1>THIS IS HEADER 1</h1><hr /><p>This is linking to a style sheet !</p><p><a href="http://www.w3school.com" target="_blank">this is a link</a></p></body></html>output:
19.vbscript program to handle string functions.
22.create a web page to display text with different style effects using embedded style sheets.
34.a)vbscript program to find factorial of given number<html><head> <title></title>
</head><body><script language="vbscript">dim n,f,if=1n=inputbox("enter a number")for i=1 to nf=f*inextmsgbox("factorial is "&f)</script></body></html>
b)vbscript program to genereate fibonacii no<html><head> <title></title> <meta http-equiv="content-type" content="text/html;charset=UTF-8" /></head><body><script language="vbscript">dim n,f1,f2,f3f1=0f2=1f3=f1+f2document.write(f1)document.write(f2)n=inputbox("enter n value")while(int(f3)<=int(n))document.write(f3)f1=f2f2=f3f3=f1+f2wend</script></body></html>
output:
enter a value:10
0 1 1 2 3 5 8
34.vb script program for Data Validation on fields in the student form.
<html><head><script language="vbscript">sub btn_onClickif IsNumeric(document.studfrm.txtname.value) then msgbox "char only" end ifif IsNumeric(document.studfrm.txtrollno.value) then msgbox "submitted"else
38.displaying cursor position with relative positions.
<html><head> <title></title> <meta http-equiv="content-type" content="text/html;charset=UTF-8" /></head><body><p> move the mouse over the words to see the cursor change</p><span style="cursor:auto;">auto</span><br><span style="cursor:crosshair;">crosshair</span><br><span style="cursor:default;">default</span><br><span style="cursor:pointer;">pointer</span><br><span style="cursor:s-resize;">s-resize</span><br><span style="cursor: wait;">wait</span></body></html>
40.xml document with simple links.
<?xml version="1.0" ?><bookstore xmlns:xlink="http://www.w3.org/1999/xlink"><book title="Harry Potter"> <description xlink:type="simple" xlink:href="http://book.com/images/HPotter.gif" xlink:show="new"> As his fifth year at Hogwarts School of Witchcraft and Wizardry approaches, 15-year-old Harry Potter is....... </description></book></bookstore>
using data islands with tablesName Code NO. Joining date Department
tony 1234 4-1-1987 shippingtimmy 1225 14-11-2000 packingrimmy 1200 4-1-1990 programmer
45. write a vbscript program to generate N natural numbers and find the sum.
<html> <head><title>prog to generate n natural no. and their sum</title></head><script type="text/vbscript">dim i
dim sumdim nsum=0n=InputBox("enter n value")for i=1 to n document.write(i&"<br />") sum=sum+inextdocument.write("sum is"&sum)</script><body>
</body></html>
Output:
49. (i)write a vbscript program to calculate the sum of first 20 even numbers<html> <head><title>prog to generate n natural no. and their sum</title></head>
(ii) write a vbscript program to check whether the given character is vowel or not.
<html> <head><title>prog to generate n natural no. and their sum</title></head><script type="text/vbscript">dim chch=InputBox("enter a character")if ch="a" or ch="e" or ch="i" or ch="o" or ch="u" then msgbox "vowel" else msgbox "not a vowel" end if </script><body>program to check given character is vowel or not</body></html>
output:enter a character (if you enter a e i o u) ---prints vowel in msgbox otherwise prints not vowel.
46.write a vbscript program to calculate the square, square root and cube of a value using function.
<html><head> <title></title> <script type="text/vbscript"> sub btn_onClick() dim val val = frm.txtnum.value Msgbox "square root :"&sqr(val) Msgbox "square is :"&val*val Msgbox "cube is :"&val*val*val end sub </script></head><body> <form name=frm> enter a number:<input type="text" name="txtnum"></input> <input type="button" name="btn" value="click"></input> </form></body></html>