if(!IsPostBack) { ChangeGetCodeImage(); } /// <summary> /// 鼠标经过改变获取验证码图片按钮的图片 /// </summary> private void ChangeGetCodeImage() { this.ibtGetCode.Attributes.Add("onmouseover", "this.src='/Images/getcode2.png'"); this.ibtGetCode.Attributes.Add("onmouseout", "this.src='/Images/getcode3.png'"); }