How to open a new page in a browser

 

method one

 

 var url = getStatusOperationButtonUrl(cell);

return "<a target='_blank' class='btn btn-ghost btn-info' href='"+url+"'>"+cell+"</a>";

 

Method Two

 

//Verify whether the delivery order can be validated

function confirmtoConfirmInvoice(_url,url){

//ajax request

esteel_purchase_list.ajaxRequest({

url:_url

},function(data){

if(data.state == "1"){

alert(data.msg);

esteel_purchase_list.list_purchase.ajaxRequestData("0");

}else{

   window.open(url); //window.location.href=''This will not open a new page

}

},function(data){

//alert(data);

// report error

});

}

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326219786&siteId=291194637