菜鸟学堂
在线运行
源代码
<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> <html> <body> <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> </body> </html>
运行结果
在线运行
菜鸟学堂 edu.jb51.net