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.
精彩评论