htmlinputhidden

代码如下:

<script  runat="server">
Sub submit(Source As Object, e As EventArgs)
      hidden1.Value=string1.Value
      p1.InnerHtml="Hidden value= " + hidden1.Value
End Sub
</script>
<br />
<!DOCTYPE html>
<html>
<body>
<br />
<form runat="server">
Enter some text: <input id="string1" type="text" size="25" runat="server" />
<input type="submit" value="Submit" OnServerClick="submit" runat="server" />
<input id="hidden1" type="hidden" runat="server" />
<p id="p1" runat="server" />
</form>
<br />
</body>
</html>

运行结果:


相关文章