前台页面源码:
div id="selDiv"
style=" z-index:100; visibility:visible; clip:rect(0px 110px 80px 92px); position:absolute; top: 95px; left: 862px;" ><%--left:279px; top:167px"--%>
<asp:DropDownList ID="ddlType_Field" runat="server" style="z-index:-1" Width="110px" DataSource="<%# getTypeFieldInfo() %>" DataValueField="Type_Field" DataTextField="Type_Name" OnSelectedIndexChanged="ddlType_Field_Selected_Index_Changed" AutoPostBack= "true"></asp:DropDownList>
</div>
<asp:TextBox ID="txtType_Field_Text" runat="server"
style=" z-index:103px; position:absolute; top: 95px; left: 862px;"
Font-Size="10" Width="93px" MaxLength ="50" Height="22px" ></asp:TextBox>
<asp:TextBox ID="txtType_Field_value" runat="server" style=" z-index:103px; position:absolute" Font-Size="10" Width="93px" MaxLength ="50" Height="22px" Visible="false"></asp:TextBox>
javascript代码:
<script type="text/javascript" language="javascript">
function addTxtTanto(val) {
document.getElementById("txtType_Field_value").value = val;
document.getElementById("txtType_Field_value").select();
}
</script>
div id="selDiv"
style=" z-index:100; visibility:visible; clip:rect(0px 110px 80px 92px); position:absolute; top: 95px; left: 862px;" ><%--left:279px; top:167px"--%>
<asp:DropDownList ID="ddlType_Field" runat="server" style="z-index:-1" Width="110px" DataSource="<%# getTypeFieldInfo() %>" DataValueField="Type_Field" DataTextField="Type_Name" OnSelectedIndexChanged="ddlType_Field_Selected_Index_Changed" AutoPostBack= "true"></asp:DropDownList>
</div>
<asp:TextBox ID="txtType_Field_Text" runat="server"
style=" z-index:103px; position:absolute; top: 95px; left: 862px;"
Font-Size="10" Width="93px" MaxLength ="50" Height="22px" ></asp:TextBox>
<asp:TextBox ID="txtType_Field_value" runat="server" style=" z-index:103px; position:absolute" Font-Size="10" Width="93px" MaxLength ="50" Height="22px" Visible="false"></asp:TextBox>
javascript代码:
<script type="text/javascript" language="javascript">
function addTxtTanto(val) {
document.getElementById("txtType_Field_value").value = val;
document.getElementById("txtType_Field_value").select();
}
</script>