代码如下所示。请帮忙看看,谢谢!
function addYear()
{
var state = document.getElementById("state");
var year = document.getElementById("year");
var stateYear = document.getElementById("stateYear");
alert(state.options[state.selectedIndex].value);
if(state.options[state.selectedIndex].value == "执行完")
{
//state.options[state.selectedIndex].value的值为执行完时也进不了该分支
alert("finished");
year.style.display = "";
stateYear.style.display = "";
}
else
{
alert("no finished");
year.style.display = "none";
stateYear.style.display = "none";
}
}
--
FROM 180.168.3.*