htmlinputtext

代码如下:

<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>

运行结果:

相关文章