用 vb 怎么写程序

来源:百度知道 编辑:UC知道 时间:2024/05/19 12:35:45
1
12
123
1234
12345
123456
1234567
12345678
123456789

需要控件:
TextBox 和 CommandButton

Text属性如下设置:
Text1.Text = ""
Text1.MultiLine = True
Text1.ScrollBars = 2

按钮代码:
Private Sub Command1_Click()
Dim MyStr As String
MyStr = "123456789"
For i = 1 To 9
Text1.Text = Text1.Text + Left(MyStr, i) + Chr(13) + Chr(10)
Next
End Sub

<%
for i=1 to 9
for j=1 to i
Response.Write( j & "*" & i & "=" & j*i & "<br />")
next
next
%>