是Web应用程序上的否框? [英] Yes No box on webapplication?

查看:70
本文介绍了是Web应用程序上的否框?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我遇到一种情况,我需要一个是/否"框来确认用户,如果用户单击否",则页面将重定向到default.aspx,否则将重定向到result.aspx.
我知道在Windows应用程序上使用Confirm Massagebox非常容易,但是在Web应用程序上,执行此操作的最简单方法是什么?
请发布代码...不要引用任何链接.
谢谢你.

i have a situation where i need a yes/ no box for confirmation from user, if user click no then page redirects to default.aspx, else result.aspx.
i know it is very easy on windows application using confirm massagebox, but on web application what is the easiest way to do this???
please post code... dont refer to any link.
thank u.

推荐答案

为什么,如果一篇文章能完美地回答你的问题,我是否应该不发布链接?
为什么您认为我应该全身心投入以免您30秒钟的工作?

您必须意识到,我们并没有为此获得报酬:我们是出于内心的善良而这样做.给出愚蠢的指令来为您提供代码而不是指向您这样做(您可能已经注意到了)有点适得其反,因为我可以很容易地给您提供解决方案,但是当初选择了花我的时间来输入所有这些内容并教育您.

如果你有礼貌;如果您使用了一些网络礼节,那么您将很高兴继续进行自己的项目.

但不是.您确定自己是我的老板,可以下达命令而不受惩罚.值得一提的是,老板会这样做,不要倾向于拥有快乐的员工-甚至长期没有好的员工.


学到了什么?
Why, if an article is answering your question perfectly, should I not post a link to it?
Why do you think I should put myself out to save you from 30 seconds of work?

You have to realise that we do not get paid for this: we do it out of the goodness of our hearts. Giving stupid instructions to give you the code rather than to point you at such is (as you may have noticed by now) somewhat counter-productive, in that I could - pretty easily - have given you the solution by now, but have instead elected to invest my time in typing all this and educating you instead.

If you had been polite; if you had used a little netiquette, you would be happily moving on with your project.

But no. You decided that you are my boss, and you could give orders with impunity. It is perhaps worth learning that bosses you do that, don''t tend to have happy staff - or indeed good staff for long.


Lesson learned?








<script type=""text/javascript">
    function fnDPolicy() {
        if (!confirm("Are you sure to navigate?")) {
            return false;
        }
    }


</script>


将此代码添加到head标签中


然后在客户端上单击按钮


add this code in head tag


then call the function on the client click of the button


这篇关于是Web应用程序上的否框?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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