htmlgeneric

代码如下:

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

运行结果:


相关文章