How do I change the Kendo alert title?

2019-08-20 19:19发布

I'm using a Kendo alert and want to change the title of it. The default title is the url name, see link(image) below. I want to use my own title, how do I change this?

Image Kendo alert

The kendo alert:

kendo.alert("mytext");

2条回答
姐就是有狂的资本
2楼-- · 2019-08-20 19:39

I found a solution to change the title, I did the following:

myalert("mytext"); 

function myalert(content) {
    $("<div></div>").kendoAlert({
        title: "mytitle!",
        content: content
    }).data("kendoAlert").open();
}

Result: Image Kendo alert custom title

I hope this answer helps a lot of people with the same problem.

查看更多
放我归山
3楼-- · 2019-08-20 19:52

you cannot change the Title it's possible to hide it using css:

.k-dialog .k-window-titlebar .k-dialog-title {
        visibility: hidden;
    }
查看更多
登录 后发表回答