首先在.aspx頁面中寫好javascript函數,例如enterevent(button) 然後用下面的語句為TextBox添加屬性,實作當onkeypress事件觸發時執行enterevent(button)函數 txtSeaCon.Attributes.Add("onkeypress","enterevent('btnSearch');");
首先在.aspx頁面中寫好javascript函數,例如enterevent(button) 然後用下面的語句為TextBox添加屬性,實作當onkeypress事件觸發時執行enterevent(button)函數 txtSeaCon.Attributes.Add("onkeypress","enterevent('btnSearch');");