它不会转到新的浏览器标签,我的代码是错误的吗?
sed -e '/sudo/ s/^#*/#/' file
答案 0 :(得分:1)
您正在寻找的内容可能是:
window.open('http://stackoverflow.com/', '_blank');
在您的代码中:
function getWaterMeterList() {
// alert("ON");
var BillingPeriod = $('#BillingPeriod').val();
$.ajax({
url: '/DataEntryWater/WaterMeterAlphaListReport',
type: 'POST',
data: { 'BillingPeriod': BillingPeriod },
dataType: 'json',
success: function (a) {
var win = window.open('http://stackoverflow.com/', '_blank')
if(win) {
win.focus(); /if tab is open, change focus there.
}
},
error: function (err) {
// do stuff here
}
});
}