简单教程
提交运行
代码编辑器:
<script runat="server"> Sub submit(sender As Object, e as EventArgs) if name.value<>"" then p1.InnerHtml="Welcome " & name.value & "!" end if End Sub </script> <!DOCTYPE html> <meta charset="utf-8" /> <form runat="server"> Enter your name: <input id="name" type="text" size="30" runat="server" /> <br><br> <input type="submit" value="Submit" OnServerClick="submit" runat="server" /> <p id="p1" runat="server" /> </form>
运行结果: