//取得現在時間
var dt = new Date();
//日期格式化傳給textbox
//此字串可直接傳給SQL存檔為datetime
document.getElementById("ctl00_ContentPlaceHolder1_ftbCRTDT_D3").value = dt.format("yyyy-MM-dd HH:mm:ss").toString();
var dt = new Date();
year = dt.getFullYear();
month = dt.getMonth();
day = dt.getDate();
if(fgvD3.rows[i2].cells[3].children[0].value == '教育訓練') {
fgvD3.rows[i2].cells[6].getElementsByTagName("input")[0].value = new Date(this.year + 2, this.month, this.day).format("yyyyMMdd").toString();
}
if (fgvD3.rows[i2].cells[3].children[0].value == 'show room展示') {
fgvD3.rows[i2].cells[6].getElementsByTagName("input")[0].value = new Date(this.year + 2, this.month, this.day).format("yyyyMMdd").toString();
}
if (fgvD3.rows[i2].cells[3].children[0].value == '測試用') {
fgvD3.rows[i2].cells[6].getElementsByTagName("input")[0].value = new Date(this.year + 1, this.month, this.day).format("yyyyMMdd").toString();
}
if (fgvD3.rows[i2].cells[3].children[0].value == '其他') {
fgvD3.rows[i2].cells[6].getElementsByTagName("input")[0].value = new Date(this.year , this.month+3, this.day).format("yyyyMMdd").toString();
}
沒有留言:
張貼留言