我在使用窗口时得到了弹出窗口.打开,我不想得到弹出窗口,链接必须直接打开


i am getting the popup when using the window.open, i didnt want to get the popup, link has to be open directly

$.post('<?php echo base_url()?>index.php/user/clickcode',{'ccode':ssid},function(res){
          if(res) {         //res will have url like http://google,com
          window.open(res);
}

location.href = res; 替换window.open(res);

window.open()将打开一个新窗口,而location.href将更新当前窗口。