Home and Blog button

Pages

Introduction

Welcome To my Blog !!
This is a blog where you can get some knowledge that i have learned and been using. Sharing is gaining pals. So Happy Sharing and don't forget to follow and link my blog with yours! Thanks.
Happy Programming!!

Saturday, June 27, 2009

How to use Elements array in VBScript!


The concept of the elements array in the VBScript!!!


Objective Question Answers!!



1. Result of 2+2 is:

4 5 6 10

2. Who is father of computer?

Mr. Rajan Charles Babbage Charles Darwin Charles Angels

3. What is DML?

Do More Language Data Mining Language Develop Money Land Data Manipulation langauage

Source Code:
<html>
<head><title>Use of VBScript</title>
<link rel="stylesheet" href="mystyle.css">

<script language="vbscript">
sub scoreclick()
dim score
if (form1.elements(0).checked = true) then
score = score + 5
end if
if (form1.elements(5).checked = true) then
score = score + 5
end if
if (form1.elements(11).checked = true) then
score = score + 5
end if
msgbox ("Your score is:" & score)
end sub
</script>
</head>

<body>
<form name="form1">
<p class="question">1. Result of 2+2 is:</p>
<p class="answer">
<input type="radio" name="q1" >4
<input type="radio" name="q1" >5
<input type="radio" name="q1" >6
<input type="radio" name="q1" >10
</p>
<p class="question">2. Who is father of computer?</p>
<p class="answer">
<input type="radio" name="q2" >Mr. Rajan&nbsp&nbsp
<input type="radio" name="q2" >Charles Babbage &nbsp&nbsp
<input type="radio" name="q2" >Charles Darwin&nbsp&nbsp
<input type="radio" name="q2" >Charles Angels
</p>
<p class="question">3. What is DML?</p>
<p class="answer">
<input type="radio" name="q3" >Do More Language&nbsp&nbsp
<input type="radio" name="q3" >Data Mining Language&nbsp&nbsp
<input type="radio" name="q3" >Develop Money Land&nbsp&nbsp
<input type="radio" name="q3" >Data Manipulation langauage
</p>
<input type="button" name="bttncalc" value="Show Score" onclick=scoreclick()>
<input type="Reset" name="reset" value="Reset">
</form>
</body>
</html>

No comments:

Post a Comment

Search This Blog