我有一個搜索框,它的東西在輸入box.The搜索圖標類型從數據庫中給出的名字,點擊後給所有從數據庫中該特定name.Now我想要搜索圖標是文本中的數據盒子,而不是外面..我該怎麼辦?如何把一個HTML文本輸入框裏面FA-搜索?
HTML:
<div class='col-md-6'>
<label for='search' class='control-label col-md-4'> Search</label>
<div class='col-md-4'>
[![enter image description here][1]][1]<input autocomplete="off" type="text" ng-model="patName" id="patName" placeholder="Patient Name" class="form-control" min-length="4" uib-typeahead="pat.pName as pat.pName for pat in patients($viewValue)" typeahead-editable="false" >
<input type="hidden" id="patientId" min-length="4" ng-model="AddqueryArr.patient" value="{{pat.pName}}">
</div>
<div class='col-md-2'>
<a href>
<i class='fa fa-search' id="myimage" ng-click='getnames(AddqueryArr.qfrom,patName.pName)'></i></a>
<br>
</div>
你必須把背景輸入元件。點擊這裏:http://stackoverflow.com/questions/917610/put-icon-inside-input-element-in-a-form – user5455130