Friday, 6 September 2013

Write a VB Script to show this figure 4

Write a VB Script to show this figure:
1
12
123
1234
12345
Index.html
<html>
<head>
<title>
VBScript By Asif
</title>
<SCRIPT LANGUAGE="VBScript">
Sub asif
                Dim i,j,x
                Dim TheForm
                Set TheForm=Document.forms("Form1")
                If IsNumeric(TheForm.Text1.Value) Then
                                x=TheForm.Text1.Value
                                for i=1 to x
                                                for j=1 to i
                                                                document.write(j)
                                                next
                                                document.write("<br/>")
                                Next
                Else
                                MsgBox "Wrong Input!"
                End If
End Sub
</SCRIPT>
</head>
<body>
<FORM NAME="Form1">
<input type="Text" name="Text1"><br/>
<INPUT TYPE="button" NAME="Button1" VALUE="View Figure"><br/>
<SCRIPT FOR="Button1" EVENT="onClick" LANGUAGE="VBScript">
                Call asif
</SCRIPT>
</FORM>
</body>
</html>
Output:

1
12
123
1234
12345

2 comments:

  1. This is a amazing website.data recovery greenville sc give me great help when i want to find my lost data.
    They have a professional team and technical support.They can solve your any software issues.You must have a try if you have a problem with your mac.

    ReplyDelete
  2. Thank you for sharing this helpful post! Do you need fake ray ban sunglasses? Go to have a look and you may find a desirable one.

    ReplyDelete