NetBlog主题

C#,Winform确认窗口关闭
WinForm技巧

C#,Winform确认窗口关闭

3877 0

private void MainFrm_FormClosing(object sender, FormClosingEventArgs e){if (MessageBox.Show("您确认退出吗?", "www.luofenming.com", MessageBoxButtons.YesNoCancel) == System.Windows.Forms.DialogResult.Yes){Dispose();Application.Exit();}e…

JS确认删除
Web前端

JS确认删除

1972 0

<script type="text/javascript"> window.onload = function () {document.getElementById(testID).onclick = test();function test() {if (confirm("你确认要删除吗?")) {alert(删除成功);}else {alert(删除失败);}}}</script><i…