日期:2009-11-15 浏览次数:20540 次
<!--源文件:form\web页面简介\page1.ASPx--> <HTML> <BODY> <SCRIPT language="VB" runat="server"> Sub ShowValues(Sender As Object, Args As EventArgs) divResult.innerText = "You selected '" _ & selOpSys.value & "' for machine '" _ & txtName.value & "'." End Sub </SCRIPT> <DIV id="divResult" runat="server"> </DIV> <FORM runat="server"> 机器名: <INPUT type="text" id="txtName" runat="server"> <P /> 操作系统: <select id="selOpSys" size="1" runat="server"> <OPTION>Windows 95</OPTION> <OPTION>Windows 98</OPTION> <OPTION>Windows NT4</OPTION> <OPTION>Windows 2000</OPTION> </SELECT> <P /> <INPUT type="submit" value="Submit" runat="server" onserverclick="ShowValues"> </FORM> </BODY> </HTML> |
<HTML> <BODY> You selected 'Windows 98' for machine 'iceberg'. <FORM name="ctrl0" method="post" action="pageone.ASPx" id="ctrl0"> <INPUT type="hidden" name="__VIEWSTATE" value="a0z1741688109__x"> 机器名: <INPUT type="text" id="txtName" name="txtName" value="tizzy"> <P /> 操作系统: <SELECT id="selOpSys" size="1" name="selOpSys"> <OPTION value="Windows 95">Windows 95</OPTION> <OPTION selected value="Windows 98">Windows 98</OPTION> <OPTION value="Windows NT4">Windows NT4</OPTION> <OPTION value="Windows 2000">Windows 2000</OPTION> </SELECT> <P /> <INPUT type="submit" value="Submit"> </FORM> </BODY> </HTML> |
If Len(Request.Form("selOpSys")) > 0 Then StrOpSys = Request.Form("selOpSys") StrName = Request.Form("txtName") Response.Write("You selected '" & strOpSys _ & "' for machine '" & strName & "'.") End If |
If Len(selOpSys.value) > 0 Then Response.Write("You selected '" & selOpSys.value _ & "' for machine '" & txtName.value & "'.") End If |