标签:
<tr><td>
<p class="short-input staff ue-clear">
<label>公司类型:</label>
<select class="l-select" onchange="cascadetype(this)" data-sub="公司名称,companyname" name="enterprisetype" id="enterprisetype" style="height:28px;">
<?php echo Ousuclass::all_html_option($companytypelist,‘name‘);?>
</select>
</p></td>
</tr>
<div id="SG" style="display:none;">
<table >
<tr><td>
<p class="short-input staff ue-clear">
<label>分包项目:</label>
<input name="projectname" id="projectname" style="height:28px;"/>
<span><em>*</em></span>
</p></td><td>
<p class="short-input staff ue-clear">
<label>造价(万元):</label>
<input name="constructcost" id="constructcost" style="height:28px;"/>
<span><em>*</em></span>
</p></td>
</tr>
</table>
</div>
function cascadetype(obj)
{
var traget=document.getElementById("SG");
if(obj.value == ‘<?php echo $SG;?>‘)
{
traget.style.display = ‘‘;
}
else
{
traget.style.display = ‘none‘;
}
}
<?php
$query = $this->mydb->find("select * from dictdatas where type = ‘companytype‘");
$data[‘companytypelist‘] = $query[‘obj‘];
$data[‘SG‘] = ‘施工单位‘;
?>
标签:
原文地址:http://www.cnblogs.com/lqw4/p/4655175.html