开发者

Using JQuery How to Perform multiple Operation on a single Button

I have one button. When i click on this button, it will show one pop up model For confirmation. When i click on OK button, i want to perform two 开发者_运维百科operation. First Operation is: It will remove one selected item form the dropdownlist and also insert the data in the table. So here First operation is Performing means it will remove the dropdownlist selected item, But data will not inserted in the table. So how can i perform two operation on a single Click button. Please Help me.


    <script type="text/javascript">
    function show_confirm() {
    var r = confirm("Press a button");
    if (r==true) {
      alert("You pressed OK!");
// any number of actions that are to be performed when Ok is clicked can be done here.
      }
    else {
      alert("You pressed Cancel!");
      }
    }
    </script>

<input type="button" onclick="show_confirm()" value="Show confirm box" />

Do let me know if you need further help though.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜