<asp:Button runat="server" οnclick="後臺方法" onClientClick="reutrn 前臺方法();"/>
前臺方法必須返回一個true或者false。true會繼續執行後臺代碼;false不會繼續執行後臺代碼
此方法在ff和IE7中測試通過,IE6未測試,測試過的朋友幫忙看一下。
還有人說ie6不支持此方法,要寫
onClientClick="event.returnValue=true"這樣纔可以。
<asp:Button runat="server" οnclick="後臺方法" onClientClick="reutrn 前臺方法();"/>
前臺方法必須返回一個true或者false。true會繼續執行後臺代碼;false不會繼續執行後臺代碼
此方法在ff和IE7中測試通過,IE6未測試,測試過的朋友幫忙看一下。
還有人說ie6不支持此方法,要寫
onClientClick="event.returnValue=true"這樣纔可以。