这是我的代码
<asp:RadioButtonList ID="PlaceofWork" name="PlaceofWork" runat="server" RepeatColumns="2" RepeatDirection="Horizontal">
</asp:RadioButtonList>
代码背后的代码:
PlaceofWork.DataSource = workplace;
PlaceofWork.DataBind();
PlaceofWork.Items.Add(new ListItem("Other - Specify<input name=\"OtherWorkPlace\" type=\"text\" id=\"OtherWorkPlace\" MaxLength=\"25\"/>", "19"));
由于某种原因,我有另一个radiobuttonlist,必须手动添加项目,代码是这样的:
<asp:RadioButton ID="DPC23" GroupName="Responsibility" class="Responsibility" runat="server" Text="PeriAnesthesia/RR" value="26" />
<asp:RadioButton ID="DPC24" GroupName="Responsibility" class="Responsibility" runat="server" Text="Other–Specify <input id='OtherDPC' type='text' MaxLength='25'/>" value="19" />
现在问题是当代码在chrome中运行时,一切正常,但是当它在IE中打开时,PlaceofWork中的文本框不起作用,当我单击文本框时,它将丢失光标,但手动添加radiobutton工作正常,有没有人知道为什么会发生这种情况?