我有这段代码可以在Firefox中完美运行。在ajax成功中,将打开一个新选项卡。但是重定向无法在Chrome,Safari和Opera中执行。 我如何使它适用于所有浏览器?
success:function(data){
var win = window.open("<?php echo base_url(); ?>/medico/billing_print_view");
if (win) {
//Browser has allowed it to be opened
win.focus();
} else {
//Browser has blocked it
alert('Please allow popups for this website');
}
},