过滤查询的值

function WriteOWCXML2HiddenField(){ 

var ph= document.getElementById("val_PH").value;

var th= document.getElementById("val_th").value;

var KJM= document.getElementById("val_KJM").value;

var PM= document.getElementById("val_PM").value;

var DLMC= document.getElementById("val_DLMC").value;

if (!DLMC && typeof(DLMC)!="undefined" && DLMC!=0)

window.parent.parent.frames['gridframe'].document.getElementById("val_DLMC").value=DLMC;

}

if (!PM && typeof(PM)!="undefined" && PM!=0)

window.parent.parent.frames['gridframe'].document.getElementById("val_PM").value=PM;

}

if (!th && typeof(th)!="undefined" && th!=0)

window.parent.parent.frames['gridframe'].document.getElementById("val_th").value=th;

}

if (!ph && typeof(ph)!="undefined" && ph!=0)

window.parent.parent.frames['gridframe'].document.getElementById("val_PH").value=ph;

} 

if (!KJM && typeof(KJM)!="undefined" && KJM!=0)

window.parent.parent.frames['gridframe'].document.getElementById("val_KJM").value=KJM;

}

return false;

}

原文地址:https://www.cnblogs.com/nuaaydh/p/4313208.html