日期:2014-05-16 浏览次数:20532 次
<td align="center"><select id="tabData11[]" name="tabData11[]" onchange="getDetail(this.value)" style="width:90%"> <? $strSql = "SELECT Distinct T_Name FROM bit.cpardata "; $query = $WORKFLOW->dbCon->getQuery($strSql); while($rs = $WORKFLOW->dbCon->getData($query)){?> <option value="<?=$rs['T_Name']?>"<?=$tmpDataArray2[0]==$rs['T_Name'] ? 'selected="selected"':''?>><?=$rs['T_Name']?></option><? }?> </select> </td> <td align="center"><input type="text" id="tabData12[]" name="tabData12[]" value="<?=$tmpDataArray2[1]?>" readonly="true" style="width:90%"></td> <td align="center"><input type="text" id="tabData13[]" name="tabData13[]" value="<?=$tmpDataArray2[2]?>" readonly="true" style="width:90%"></td> <td align="center"><input type="text" id="tabData14[]" name="tabData14[]" value="<?=$tmpDataArray2[3]?>" readonly="true" style="width:90%"></td>
function getDetail(val){ <? $strSql = " SELECT vcarNo,T_Name,T_title,T_area,T_Tel FROM bit.cpardata_detail Where T_Name ='".val."' "; $query = $WORKFLOW->dbCon->getQuery($strSql); $rs = $WORKFLOW->dbCon->getData($query); ?> document.getElementById("tabData12[]").value =<? $rs['T_title'] ?>; document.getElementById("tabData14[]").value =<? $rs['T_area'] ?>; document.getElementById("tabData15[]").value =<? $rs['T_Tel'] ?>; }
<td align="center"><select id="tabData11[]" name="tabData11[]" onchange="getDetail(this)" style="width:90%"> <? $strSql = "SELECT Distinct T_Name FROM bit.cpardata "; $query = $WORKFLOW->dbCon->getQuery($strSql); while($rs = $WORKFLOW->dbCon->getData($query)){?> <option value="<?=$rs['T_Name']?>"<?=$tmpDataArray2[0]==$rs['T_Name'] ? 'selected="selected"':''?>><?=$rs['T_Name']?></option><? }?> </select> </td> <td align="center"><input type="text" id="tabData12[]" name="tabData12[]" value="<?=$tmpDataArray2[1]?>" readonly="true" style="width:90%"></td> <td align="center"><input type="text" id="tabData13[]" name="tabData13[]" value="<?=$tmpDataArray2[2]?>" readonly="true" style="width:90%"></td> <td align="center"><input type="text" id="tabData14[]" name="tabData14[]" value="<?=$tmpDataArray2[3]?>" readonly="true" style="width:90%