假如你的textbox的ID是“txtMy”: 后台的Page_Load事件中加这么段代码: protected void Page_Load(object sender, EventArgs e) { this.txtMy.Attributes.Add("onmouseout", "javascript:alert(\"离开我了\");"); } 或者直接 如果是Input标签。...
给文本框绑定 onblur 事件 当光标移开文本框后触发