等待服务器端的javascript确认消息响应?

时间:2013-02-04 11:19:48

标签: c# javascript asp.net

这样的事情可能吗?

     ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "Confirm", "x()", true);
    if (hid.Value != null)
    {
    }
    else
    {
    }

    function x() {
    var message = confirm("Are you sure you want to continue ?");
    if (message == true) {
        document.getElementById("hid").value = "1";
    }
    else {
        document.getElementById("hid").value = "0";
    }
}

0 个答案:

没有答案