问候所有
我正在使用KENDO UI PROMPT。
$("#promptBtn").on("click", function () {
window.myprompt("Please enter password!").then(function (data) {
window.location.pathname = "unlock.php";
})
});
function myprompt(content, defaultValue){
return $("<div></div>").kendoPrompt({
title: "Lock Session",
content: content
}).data("kendoPrompt").open().result;
}
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title>Kendo UI Snippet</title>
<link rel="stylesheet" href="https://kendo.cdn.telerik.com/2019.1.220/styles/kendo.common.min.css"/>
<link rel="stylesheet" href="https://kendo.cdn.telerik.com/2019.1.220/styles/kendo.rtl.min.css"/>
<link rel="stylesheet" href="https://kendo.cdn.telerik.com/2019.1.220/styles/kendo.silver.min.css"/>
<link rel="stylesheet" href="https://kendo.cdn.telerik.com/2019.1.220/styles/kendo.mobile.all.min.css"/>
<script src="https://code.jquery.com/jquery-1.12.4.min.js"></script>
<script src="https://kendo.cdn.telerik.com/2019.1.220/js/kendo.all.min.js"></script>
</head>
<body>
<button id="promptBtn" class="k-button">myprompt</button>
</body>
</html>
答案 0 :(得分:0)
好吧,我想它不能做到这一点,所以我需要为此使用kendoWindow!
public class Trade
{
public string AccountId
{
get;
set;
}
public string SalesCode
{
get;
set;
}
public decimal PrincipalAmount
{
get;
set;
}
public decimal GrossBrokerage
{
get;
set;
}
public decimal NetBrokerage
{
get;
set;
}
}
var lockScreen = $("#lockScreen");
lockScreen.kendoWindow({
visible: false,
width: "200px",
height: "130px",
actions: [],
modal: true,
title: "LOCKED!"
});
$("#menuLock").click(function() {
lockScreen.data("kendoWindow").center().open();
});
*{font-size:11px; font-family:Arial;}