开发者

how to write the confirm box code in jquery?

开发者 https://www.devze.com 2023-03-17 14:37 出处:网络
How to write the jquery in asp.net2.0, i click the button display confirm box based on requirements Confirm box change the buttons(yes,No) and images(warning,information etc) and Heading also

How to write the jquery in asp.net2.0, i click the button display confirm box based on requirements

  • Confirm box change the buttons(yes,No) and images(warning,information etc) and Heading also pls give me total code, which libraries added and how to write the function in asp.net2.0.
  • alert box also displayed based on condition hange the images and heading.

    1. which libraries added and开发者_Python百科 how to write the function

    function: $("#confirm_button").click( function() {

    jConfirm('Can you confirm this?', 'Confirmation Dialog', function(r) {
                                    jAlert('Confirmed: ' + r, 'Confirmation Results');
                                });
                            });
    

    i am click the button code like

**

> <input id="confirm_button"
> type="button" value="Show Confirm" />

**

Pls help me

THNAK U HEMANTH


$(document).ready(function()
{
    $("#iId").click(function () 
    {
        if (confirm('Your confirm text?')) 
    {
            //confirm='true', (means if you click on ok)
        // your code will go hire
        }
        else
    {
        //confirm='false', (means if you click on cancle)
            // your code will go hire
    }

    });
});

Note: You have to keep jquery-ui script file in your code


You should take a look at the jquery UI dialog: http://jqueryui.com/demos/dialog/

Hope this helps. Cheers

0

精彩评论

暂无评论...
验证码 换一张
取 消