function Confirm(msg)
{
var alertFram = document.createElement("div");
$(alertFram).attr('id', 'confirmFram');
$(alertFram).attr('class', 'alert alert-block');
$(alertFram).width('300px');
$(alertFram).height('100px');
$(alertFram).css({
"position":"absolute",
"left":"40%",
"top":"30%",
"margin-left":"-75px",
"text-align":"center",
"line-height":"50px",
});
strHtml = ' <h4 class="alert-heading">警告!</h4>';
strHtml += msg;
strHtml += "<p> <input type=\"button\" class=\"btn btn-danger\" value=\"确 定\" onclick=\"ok()\" />";
strHtml += " <input type=\"button\" class=\"btn btn-danger\" value=\"取消\" onclick=\"cancel()\" />";
$(alertFram).html(strHtml);
$('body').append(alertFram);
this.ok = function()
{
$(alertFram).hide();
return true;
}
this.cancel = function()
{
$(alertFram).hide();
return false;
}
return false;
}
有会的朋友帮帮忙吧
心有法竹
相关分类