網(wǎng)(LieHuo.Net)教程 用JS來操作一個XML文檔來實現(xiàn)一個簡單的表單聯(lián)動。
aspx頁面:
以下為引用的內(nèi)容: aspx頁面: <table cellspacing="0" cellpadding="0" width="100%" border="0"> <tr> <td height="25" width="30%" align="right"> UName : </td> <td height="25" width="*" align="left"> <asp:TextBox ID="txtUName" runat="server" Width="200px"></asp:TextBox> </td> </tr> <tr> <td height="25" width="30%" align="right"> UCountry : </td> <td height="25" width="*" align="left"> <asp:TextBox ID="txtUCountry" runat="server" Width="200px"></asp:TextBox> </td> </tr> <tr> <td height="25" width="30%" align="right"> UProvince : </td> <td height="25" width="*" align="left"> <asp:DropDownList ID="ddlUProvince" runat="server" onchange="ResetCity(this,'ddlUCity');"> </asp:DropDownList> </td> </tr> <tr> <td height="25" width="30%" align="right"> UCity : </td> <td height="25" width="*" align="left"> <asp:DropDownList ID="ddlUCity" runat="server"> </asp:DropDownList> </td> </tr> <tr> <td height="25" colspan="2"> <div align="center"> <asp:Button ID="btnAdd" runat="server" Text="注冊" OnClick="btnAdd_Click"></asp:Button> </div> </td> </tr> </table> <script> InitProvince('ddlUProvince');</script> |
aspx.cs:
以下為引用的內(nèi)容: string province=Request["ddlUProvince"]; string city=Request["ddlUCity"]; |
JS+XML下載:js+xml_city.rar