如何获得消息框值 [英] How to get the message box value

查看:69
本文介绍了如何获得消息框值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,
谁能告诉我如何在前端代码中获取确认消息框的值?
预先谢谢你
我的意思是我可以在Javascript中使用Messagebox,但是当用户单击时我想获取布尔值0/1 ...该值应从声明了消息框的.aspx文件的aspx.vb页面中获取...

Hi there
Can anyone tell me how to get the value of a confirmation messagebox in front end code?
Thank you in advance
I meant I can use Messagebox with javascript but I want to get the boolean value 0/1 as the user clicks...The value should be got in the aspx.vb page from the .aspx file where the message box declared...How?

推荐答案

它是由消息框调用返回的,它是一个布尔值.在前端,您是指javascript吗?就是前端.
It''s returned by the message box call, and it''s a bool. By front end, do you mean javascript ? That''s the front end.


一个简单的例子

a simple example

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>Untitled Page</title>
    <script language="javascript" type="text/javascript">
        function GetValue()
        {
            if(window.confirm("Are you sure to get the value???"))
            {
                alert("Got confirmation");
            }
            else
            {
                alert("Didn't got confirmation");
            }
        }
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <input type="button" value="Click Me" onclick="javascript:GetValue();" />
    </div>
    </form>
</body>
</html>



不是??:cool:

如果该帖子解决了您的问题,请将其标记为答案.



simple isn''t ??:cool:

If this post solves your issue please mark it as answer.


这篇关于如何获得消息框值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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