如何知道该语句返回true或false [英] How to know the statement return true or false

查看:110
本文介绍了如何知道该语句返回true或false的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

HI,

当我单击按钮时,我使用了以下代码:



when i am clicking on a button i have used the below code:

Page.ClientScript.RegisterStartupScript(GetType(), "logout", "window.close();", true);


我怎么知道用户单击是"或否".

如果用户单击否",我必须做一件事,如果用户单击是",它将关闭浏览器.

如何在c#.net


How can i know the user click on "yes" or "no".

If the user clicks on "no" i have to do one thing, if he clicks "yes" it will close the browser.

how can i catch the value in c#.net

推荐答案

中捕获该值,请查看下面链接中的确认框.

http://www.w3schools.com/js/js_popup.asp [
Have a look at the confirm box in the link below.

http://www.w3schools.com/js/js_popup.asp[^]


这篇关于如何知道该语句返回true或false的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆