欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

使用JS輕松實(shí)現(xiàn)ionic調(diào)用鍵盤(pán)搜索功能(超實(shí)用)

 更新時(shí)間:2016年09月06日 14:25:39   投稿:mrr  
這篇文章主要介紹了使用JS輕松實(shí)現(xiàn)ionic調(diào)用鍵盤(pán)搜索功能(超實(shí)用)的相關(guān)資料,非常不錯(cuò),具有參考借鑒價(jià)值,需要的朋友可以參考下

這個(gè)需求是產(chǎn)品提的,一開(kāi)始只是設(shè)置了 <input style="padding-top: 3px;" type="search" placeholder="搜索醫(yī)生或醫(yī)院" ng-model="query">

type="search"

發(fā)現(xiàn)android上可以ios調(diào)取不出search健來(lái),氣死我了,經(jīng)過(guò)google的搜索得到結(jié)論,需要在外面套用一個(gè)form表單,于是加上果然好使而且結(jié)合了form表單提交的事件直接調(diào)用了button 按鈕的點(diǎn)擊事件ng-click="searchSelect()",不需要額外再去監(jiān)聽(tīng)搜索鍵盤(pán)點(diǎn)擊事件,省了一大堆的麻煩,果然很實(shí)用啊,我真是個(gè)天才

hml代碼如下:

<form>
<div class="bar bar-header item-input-inset" style="height: 50px;">
<label class="item-input-wrapper" id="search-input">
<i class="icon ion-ios-search" style="position: relative;color: gray;font-size: 1.5em;top: 1px;"></i>
<input style="padding-top: 3px;" type="search" placeholder="搜索醫(yī)生或醫(yī)院" ng-model="query">
</label>
<button class="button button-clear" style="color: #49B746;" ng-click="searchSelect()">搜索</button>
</div>
</form>

js代碼如下:

$scope.searchSelect = function(){
if ($scope.currentSearchType == 'hospital'){
}else{
$scope.search();
}
};

以上所述是小編給大家介紹的使用JS輕松實(shí)現(xiàn)ionic調(diào)用鍵盤(pán)搜索功能(超實(shí)用),希望對(duì)大家有所幫助,如果大家有任何疑問(wèn)請(qǐng)給我留言,小編會(huì)及時(shí)回復(fù)大家的。在此也非常感謝大家對(duì)腳本之家網(wǎng)站的支持!

相關(guān)文章

最新評(píng)論