// 描述:实现getParentDocument()函数的应用,获取当前文档的父文档对象
var value = "";
var options = "0%;20%;40%;60%;80%;100%";
var parent = getParentDocument(); //getParentDocument()
if(parent != null){
value = parent.getItemValueAsString("finishdegree");
if(value != null) {
if(value == "0%"){
value += ";20%;40%;60%;80%;100%";
}
if(value == "20%"){
value += ";0%;40%;60%;80%;100%";
}
if(value == "40%"){
value += ";0%;20%;60%;80%;100%";
}
if(value == "60%"){
value += ";0%;20%;40%;80%;100%";
}
if(value == "80%"){
value += ";0%;20%;40%;60%;100%";
}
if(value == "100%"){
value += ";0%;20%;40%;60%;80%";
}
if(value != "") {
options = "";
options = value;
}
}
}
options; |