微信小程序——弹出并隐藏键盘(带有输入框,可编辑)

点击按钮唤起键盘并且键盘上带有输入框,点击发送或者空白处可将输入的内容发送到指定的顶部输入框,不理解的可以私聊本人哦!!!

1、编辑好静态文件 

.HTML文件
<!-- 点击需要编辑的输入框,“顶部输入框” -->
<view class="editView">
  <input type="text" placeholder="请输入内容" value="{
  {inputContent}}" focus="{
  {focus}}"></input>
  <view class="editBtn" bindtap="clickBtn">编辑</view>
</view>

.css文件
<!-- 点击需要编辑的输入框的样式 -->
.editView{
  width: 100%;
  height: 110rpx;
  background-color: rgb(35, 36, 35);
  display: flex;
  flex-direction: row;
}
.editView input{
  width: 580rpx;
  height: 90rpx;
  background-color: #fff;
  line-height: 60rpx;
  margin: 10rpx 0 10rpx 20rpx;
  border-radius: 10rpx 0 0 10rpx;
  padding-left: 20rpx;
}
.editView .editBtn{
  border-radius: 0 10rpx 10rpx 0;
  width: 130rpx;
  height: 90rpx;
  margin: 10rpx 20rpx 10rpx 0;
  text-align: center;
  align-se
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值