1. 程式人生 > >微信小程式 修改鍵盤的回車鍵

微信小程式 修改鍵盤的回車鍵

在input標籤中有一個confirm-type 屬性,即設定鍵盤右下角按鈕的文字,僅在type=’text’時生效

示例:

<input type="text" placeholder="搜尋" confirm-type="search"/>

confirm-type 有效值:

  • send 右下角按鈕為“傳送”
  • search 右下角按鈕為“搜尋”
  • next 右下角按鈕為“下一個”
  • go 右下角按鈕為“前往”
  • done 右下角按鈕為“完成”