How to programmatically click on the confirm button of the dialog box?

I tried to delete, but it does not go in, I can not understand why. Therefore, I decided to think maybe you can programmatically click on the button of the dialog box.

input.eq(iinp).attr('onclick','myFunction()'); input.eq(iinp).prop('onclick',null); input.eq(iinp).off('click'); $('html').unbind('click'); input.eq(iinp).removeAttr("onclick"); 

 <input type="submit" name="fyy" value="конец" onclick="return confirm('Вы точно этого хотите?')" /> 
  • I did not quite understand the question. Do you want to click OK when the dialog box appears or open the dialog box itself? - Mr. Black
  • @Doofy need to click on the button of the dialog box - That is, there is a dialog box on which there are buttons. These buttons can not be on the wall in your room. - gilo1212 7:44 pm
  • through Delphi is possible - Yury Svetlov

1 answer 1

You can neither stylize nor affect the system windows using javascript from the browser.

You need to implement such a modal window yourself or use one of the ready-made solutions. For example, SweetAlert . It supports confirmation windows.

Here is an example of his work (more on the link above):

enter image description here

  • Thank you so much for your responsiveness, but I wasn’t interested in creating a self-contained dialog box, and all the process and support associated with it. - gilo1212
  • 2
    @ gilo1212 there is no way to change or affect the system windows. This is a big blow to browser security. Therefore, your question is not resolved in principle - VenZell
  • Someone wrote that you can do this through Delphi, maybe you know how? Through kakuy-tu bibioteku? - gilo1212
  • @ gilo1212 is not a library, but a third-party program. No, I do not know, but it is unlikely that you need the user to download and run some more stray stuff instead of the browser - VenZell