<script language="javascript">
function ChangeFace(e)
{
document.forms[0].Face.src = e.value;
}
</script>
<TR bgColor="#f2f8ff">
<TD width="40%"><font color="#000000"><FONT color="#000000"><B>头像:</B><BR>
选择用户的头像</FONT></font></TD>
<TD width="60%">
<asp:DropDownList id="FaceSelect" onChange="ChangeFace(this)" runat="server" Width="56px"></asp:DropDownList>
<IMG id="Face" hspace="10" src="images/face/1.gif" align="absMiddle" vspace="5" name="Face">查看所有头像
</TD>
</TR>
在changeinfo.aspx中的Page_Load中加入
private void Page_Load(object sender, System.EventArgs e)
{
for(int i = 1; i <= 90; i++)
{
aceSelect.Items.Add(new ListItem(i.ToString() + ".gif","images/face/" + i.ToString() + ".gif"));
}
}