input 同時有onclick onserverclick 時無法用 。。。我以前用的好好的 不知道為什么那個頁面突然就不好用了。<input type="button" id="toubiao_bu2" name="toubiao_bu2" value="" runat="server" onclick="return mtest()" onserverclick="toubiao_bu2_Click"/>2個事件都有的時候不好用 只有一個的時候運行沒有問題 2個一起就沒有反應了求解決 其他頁面都好就這個不行 求解決啊
2 回答

慕少森
TA貢獻2019條經(jīng)驗 獲得超9個贊
當你設置為runat=server的時候,onclicd已經(jīng)是server的click了吧?
你把生成的HTML代碼分析下,看下是哪里出現(xiàn)了問題。

POPMUISE
TA貢獻1765條經(jīng)驗 獲得超5個贊
把:
<input type="button" id="toubiao_bu2" name="toubiao_bu2" value="" runat="server" onclick="return mtest()" onserverclick="toubiao_bu2_Click"/>
修改為:
<input type="button" id="toubiao_bu2" name="toubiao_bu2" value="" runat="server" onclick="if(!mtest()) return false;" onserverclick="toubiao_bu2_Click"/>
看下結果。這樣應該能通過。
無論我修改這個是否能通過,你都應該想想我為什么看了你的輸出后就這樣去修改。
- 2 回答
- 0 關注
- 443 瀏覽
添加回答
舉報
0/150
提交
取消