处理 Telerik UI for ASP.NET AJAX 按钮与标准按钮的客户端点击
<input onclick="return myStandardClickHandler(this);" value="Standard control" id="Button1" runat="server" type="submit" />
<telerik:RadPushButton OnClientClicking="myTelerikClickHandler" Text="Telerik control" ID="RadPushButton1" runat="server"></telerik:RadPushButton>
<script>
function myStandardClickHandler(btn) {
//to get the object that fired the event, you must wire the event in a special way
alert(btn);
//the standard way of stopping further handler execution
return false;
}
function myTelerikClickHandler(sender, args) {
//the reference to the Telerik control that fired the event is available as the first argument
alert(sender);
//cancellable Telerik control events allow you to stop event execution like this
args.set_cancel(true);
}
</script>