2016-03-20 19 views

回答

0
@(Html.Kendo().Button() 
    .Name("textButton") 
    .HtmlAttributes(new { @class = "btn-primary" }) 
    .Content("Add BusinessUnit") 
) 

而且在JavaScript

$('#textButton').on('click', function() 
    { 
    $.ajax({ 
     url: '@Url.Action("ActionName", "ControllerName")', 
     type: 'GET', 
     success: function (data) { 
      alert(data); 
     }, 
     error: function() { 
      console.log("add business unit error rendering page"); 
     } 
     }); 
    }); 

Telerik的按鈕,HTML按鈕之間的唯一區別就是造型。你可以使用普通的html按鈕和按鈕點擊事件,因爲它現在正在工作,只需將css類添加到按鈕即可。 k-button和k-primary是kendo造型類

<input type="submit" value="Create" name="Command" class="k-button k-primary" /> 
相關問題