简体   繁体   中英

JSP page yes/no dialog box

I have three fields on JSP Update page userid, name and ssn.. I would like to have simple dialog box saying "You already have ssn, are you sure you want to modify it?" depending on the user's yes or no response than it performs the task? Is there a way I can add something on my java code to make this happen.. any help would be great.. thank you..

You should use java script for this.

<script type="text/javascript">
    var response = confirm ("You already have ssn, are you sure you want to modify it?")
    if (response){
      //do yes task
    }else{
     //do no task
    }
</script>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM