2017-04-15 117 views
0

我有一個日期選擇器PHP頁面和一個按鈕,進入該功能js函數在新窗口或標籤

function clickme() 
{ 
if (checkEmpty("date")) return; 
if (checkEmpty("end")) return; 

var d = convertDate(EL("date").value); 
var e = convertDate(EL("end").value); 
if (d == null) { 
    EL("date").focus(); 
alert("The date must be in dd/mm/yyyy format."); 
return; 
} 
if (e == null) { 
    EL("end").focus(); 
alert("The date must be in dd/mm/yyyy format."); 
return; 
} 

var x = getXmlHttpRequest(); 
if (x == null) { 
    alert("Unable to get XmlHttpRequest"); 
    return; 
} 

var u = "dates-xl.php?date="+ d +"&end=" + e; 

x.open("GET", u, false); 
x.send(); 

var t = x.responseText; 
if (t != null && t != "") { 
    var e = EL("content"); 
    e.innerHTML = t; 
} 
} 

這工作打開,但其中有一個頁眉頁腳等在同一頁面打開,我需要它在新標籤頁或窗口中打開,我該怎麼做?

回答