how do close modal form from another page

前端 未结 4 678
旧巷少年郎
旧巷少年郎 2021-01-14 18:44
 $(document).ready(function()
 {
     $(\"#create-user\").button().click(function()
     {
         $(\"#dialog-form\").load(\'test.html\').dialog({ modal:true, });          


        
相关标签:
4条回答
  • 2021-01-14 19:11

    for closing the dialog you can use,

    $("#dialog-form").dialog('close'); 
    
    0 讨论(0)
  • 2021-01-14 19:12

    SimpleModal will automatically bind the close function (using the onclick event) to any element inside the dialog with the simplemodal-close class.

    In addition, you can programmatically close the currently opened dialog by calling $.modal.close();

    This means: in your closeWindow()-function, you could simply enter the line:

     $.modal.close();
    
    0 讨论(0)
  • 2021-01-14 19:13

    have this code.

    <form ... onsubmit="window.location.assign('#close')">
    
    0 讨论(0)
  • 2021-01-14 19:14

    Sample.

    HTML:

    <input type="button" onclick='pop = window.open("http://www.google.com");' value="Click Me" />
    <a href="#" onclick="pop.close();">Close</a>
    

    Javascript:

       <script>
           var pop;
       </script>
    

    This works. Good luck!

    0 讨论(0)
提交回复
热议问题