|
capalexmethod, yes. Thank you.
To express my gratitude, let me provide java script.
function changeQryType() {
var st=document.all["cbx_QryType"].value;
var lbl=document.all["lbl_Value2"];
var cbx=document.all["cbx_Value2"];
var i=0;
var now=new Date();
//visible
lbl.style.display="block";
cbx.style.display="block";
//Set its display content
cbx.length=0; //Clear items
if (st=="month") {
lbl.innerText="Month:"; //Refer to the webpage: http://www.e2web.cn/etemp/001/47789.htm
for (i=1; i<=12; i++) {
cbx.add( new Option(i, i, true, true) ); //Add item
}
cbx.value=now.getMonth(); //value
}
else if (st=="season") {
lbl.innerText="Quarter:";
for (i=1; i<=4; i++) {
cbx.add( new Option(i, i, true, true) );
}
cbx.value="1";
}
else if (st=="halfyear") {
lbl.innerText="Half a year:";
cbx.add( new Option("First half", "上", true, true) );
cbx.add( new Option("Second Half Year", "Next", true, true) );
cbx.value="上";
}
else {
lbl.style.display="none";
cbx.style.display="none";
}
return true;
}
//initialization
function initForm() {
var i=0;
var cbx=document.all["cbx_Year"];
var now=new Date();
var s=now.getYear();
for (i=1990; i<=2500; i++) cbx.add( new Option(i, i, true, true) );
cbx.value=s;
//
changeQryType();
} |
|