高手帮帮忙,用VB来做几个简单的ASP题目!!

来源:百度知道 编辑:UC知道 时间:2024/06/05 07:53:24
利用学过的知识,设计一个ASP程序,要求计算出用户输入数的2倍,并在窗口中返回结果。(要求有输入输出对话框和按钮)。

ASP 还是 VB,..这个完全没必要使用ASP来写~~~~~~~~~简单的VB就可以了

<input type=text id=ip />
<input type=button onclick=d() value='计算' />
<input type=text id=op readonly />
<script language=vbscript>
Function d()
Dim ip
ip = document.getElementById("ip").value
If Trim(ip) = "" Or IsNumeric(ip) = False Then
MsgBox "必须输入数字!"
document.getElementById("ip").value = ""
Exit Function
End If
document.getElementById("op").value = ip * 2
End Function
</script>