我正在尝试替换javascript confirm().我找到了可以完全自定义的jquery dialog()函数.问题是我不能让它返回真或假.
这是我的代码:
$('#delBox').dialog(
{ autoOpen: false, resizable: false, modal: true, closeOnEscape: true, width: 300, height: 'auto', title: 'Deletar registro',
buttons: {
"Ok": function () {
return true;
}, "Cancelar": function () {
$(this).dialog("close");
return false;
}
},
open: function () {
var buttonsSet = $('.ui-dialog-buttonset').find("button:contains('Ok')");
buttonsSet.attr("class", "ui-button ui-state-default");
$('.ui-dialog-titlebar-close span').empty();
$('.ui-dialog-buttonset').find("button:contains('Ok')").button({
text: false,
icons: {
primary: 'ui-icon-ok'
}
});
$('.ui-dialog-buttonset').find("button:contains('Cancelar')").button({
text: false,
icons: {
primary: 'ui-icon-cancel'
}
});
}
});
Run Code Online (Sandbox Code Playgroud)
这只会在选择任何选项之前返回一个对象:
function deletar() …
Run Code Online (Sandbox Code Playgroud) 我有这张表:
\n\nid Name Age \n------ ----------------- ----\n10015 Phill 12\n10016 Anne 14\n
Run Code Online (Sandbox Code Playgroud)\n\n我只需要 Phill\xc2\xb4s 年龄。所以我这样做:
\n\nSELECT Age FROM Persons WHERE id = 10015\n
Run Code Online (Sandbox Code Playgroud)\n\n但我需要将该信息保存到变量中。
\n\n如果我这样做:
\n\nDECLARE @age Int\nSET @age = SELECT Age FROM Persons WHERE Name LIKE 'Phill'\n
Run Code Online (Sandbox Code Playgroud)\n\n我收到此错误:
\n\nIncorrect syntax near the keyword 'SELECT'.\n
Run Code Online (Sandbox Code Playgroud)\n 当我尝试回滚到一个特定的提交时,我收到此错误消息:
fatal: ambiguous argument ´2a92a39´: unknown revision or path not in the working tree.
Run Code Online (Sandbox Code Playgroud)
我习惯的命令是
git reset --hard 2a92a39
Run Code Online (Sandbox Code Playgroud)
编辑: 我得到完整的SHA-1:
fatal: Could not parse object ´2a92a39a121383cdae92bfecb7f2e2120e0cdd5f´
Run Code Online (Sandbox Code Playgroud)
Github for Windows没有这个选项?
我的git项目就在这里.