function SetFormValue(column,values)
{
var elem;
for(var m=0;m{
var tempValue=column[m];
elem=null;
elem=document.getElementById (tempValue);
if(elem==null)
{
//If there is no corresponding control, skip this loop
continue;
}
var trueValue=eval("values.Rows[0]." tempValue);
if(trueValue==''||trueValue=='null'||trueValue==null)
{
//If the current value is empty, skip this loop
continue;
}
if(elem.tagName=='SELECT')
{
//select control Also handle
for(var j=0;j {
if(trueValue==elem.options[j].value)
{
//Find the corresponding element and make it selected
elem.options[j].selected=true;
//Make it unselectable
elem.disabled=true;
//Exit Loop
break;
}
}
}
else if(elem.tagName=='INPUT')
{
elem.value=trueValue;
elem .readOnly=true;
}
}
}
Statement:The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn