1、引入jquery
2、使用 $("#gov").autocomplete
3、css改变背景
前端
```html
<?php if (!defined('YIDE_VERSION')) exit(); ?>
<Admintemplate file="Common/Head"/>
<link href="http://code.jquery.com/ui/1.10.4/themes/ui-darkness/jquery-ui.css" />
<body class="J_scroll_fixed">
<div class="wrap J_check_wrap">
<Admintemplate file="Common/Nav"/>
<style>
.ke-dialog{
top:100px;}
//搜索框背景及滚动条调整
.ui-autocomplete {
background: #fff !important;
max-width: 390px;
max-height: 200px;
overflow-y: auto;
overflow-x: hidden;
}
/* IE 6 ��֧�� max-height
* ����ʹ�� height ���棬�������ǿ�Ʋ˵�������ʾΪ�Ǹ��߶�
*/
</style>
<div class="h_a">需求添加</div>
<form class="J_ajaxForm" action="{:U("Need/add")}" method="post" id="myform">
<div class="table_full mb30">
<table width="100%">
<tr>
<th width="100">需求图片</th>
<td>
<!-- <div class="upload-file" style="display: inline-block;"> -->
<input type="file" class="input-file" accept=".jpg,.jpeg,.png,.gif" id="file" name="need_imgurl" >
<!-- <span class="tip">点击上传图片</span>
</div> -->
</td>
</tr>
<tr>
<th width="100">联系号码</th>
<td><input type="text" name="telephone" value="" class="input" size="60" placeholder="手机号"></input></td>
</tr>
<tr>
<th width="100">需求标题</th>
<td><input type="text" name="need_title" value="" class="input" size="60" placeholder="需求标题"></input></td>
</tr>
<tr>
<th width="100">单位</th>
<td><input type="text" id="gov" name="gov" value="" class="input" size="60" placeholder="单位"></input></td>
<input type="hidden" id="rid" name="gov_id" value="">
<!-- <select name="rid" class="roomid" onchange="getqyinfo(this.value)">
</select> -->
</tr>
<if condition="$is_creator eq 1"