嗨,我想在输入公司名称时放置搜索框,就像拨号站点一样,它会自动在另一个文本框中填写城市名称
" onfocus="javascript:this.value='';" onblur="javascript: if(this.value==''){this.value='';}" onKeydown="javascript: if (event.keyCode= =13)serachProduct();"/> <div class="textCurve1" style="float:left;margin-left:10px;">
<div class="selectsSR">
<input type="text" id="cityname" name="cityname" onKeydown="javascript: if (event.keyCode==13)serachProduct();" value="<?php if(isset($cityName)){echo ucfirst($cityName);}else{echo"City";} ?>" onfocus="javascript:this.value='';" onblur="javascript: if(this.value==''){this.value='<?php if(isset($cityName)){echo ucfirst($cityName);}else{echo"City";} ?>';}"/>
</div>
</div>
SELECT select_company.company_name,select_city.city FROM select_company LEFT JOIN select_city ON(select_company.city=select_city.id) WHERE select_company.company_name LIKE ".$this->db->escape($company."%")." 限制 10"
想要自动更新城市字段文本框