简体   繁体   中英

My window.open open a new window instead of a new tab

When executing window.open I want to open a new tab but in my page it opens a new window. How can I open in a new tab?

Here is my code :

                $('.visu_cr_pdf').click(function(){                 
                $.post("{ART_wwwroot}page.php?module={module}&action=gene_p4_pdf",$('#p4_cr'), function(data) {
                    var reponse = $.parseJSON(data);
                    if(reponse.status=='success'){


                        window.open('{ART_wwwroot}page.php?module={module}&action=visu_p4_cr','_blank');
                        return false;
                    }     
                });

            }); 

Did you try setting the attribute target="_blank" directly in your form? ( the mdn )

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