To implement the linkage problem in the two Drop-down lists, change the value in another Drop-down list based on the value in the first Drop-down list, select the value of text, and change the value of text, such as the Drop-down list below, and choose the appropriate type of document according to nationality (if not Chinese nationality, the default choice passport)
<tr>
<TD style= "Text-align:right" >
National Cadastral
</td>
<TD width= "20%" >
<asp:dropdownlist id= "DDLGJ" runat= "Server" height= "20px" width= "142px" runat= "Server" onchange= "Gethuzhao" () >
</asp:DropDownList>
</td>
<TD style= "Text-align:right" width= "12%" >
Certificate type
<%--<asp:linkbutton id= "Lkbhospno" text= "one" forecolor= "Blue" runat= "server" font-underline= "True" Onclientclick= "Queryhispat ();" ></asp:LinkButton>--%><span>:</span>
</td>
<TD width= "20%" >
<asp:dropdownlist id= "Ddlidcardtype" runat= "Server" height= "18px" width= "141px" class= "selected" >
</asp:DropDownList>
</td>
</tr>
JS Implementation code:
function Gethuzhao ()
{
if ($ ("#ddlGJ"). Find ("option:selected"). Text ()!= "China") {
$ ("#ddlIDCardType Option "). each (function () {
if ($ (). Text () =" Passport ") {
$ (This). attr ("selected", true);
}
};
}else {
$ ("#ddlIDCardType option"). each (function () {
if ($ (this). Text () = "resident identity card") {
$ (This). attr ("selected", true);
}
};
}
}