首页 > 其他 > 详细

mui弹窗input变成textarea

时间:2018-07-05 18:56:53      阅读:449      评论:0      收藏:0      [点我收藏+]

//css

/*弹窗*/
.mui-popup-title {
color: #E26602;
font-size: 16px;
}

.mui-popup-button {
color: #E26602;
font-size: 15px;
}

.mui-popup-input {
height: 150px;
}

.mui-popup-input input {
font-size: 14px;
width: 100%;
height: 30px;
margin: 10px 0 0;
padding: 0 5px;
border: 1px solid rgba(0,0,0,.3);
border-radius: 0;
background: #fff;
}

.prompt bdi {
color: #E26602;
padding-right: 5px;
}

textarea {
height: 145px;
color: #666666;
font-size: 15px;
padding: 4px 8px;
margin-top: 10px;
}

 

//js

document.getElementById("ipt_endorsing").addEventListener(‘tap‘, function (e) {
e.detail.gesture.preventDefault();
var btnArray = [‘取消‘, ‘确定‘];
mui.prompt(‘‘, ‘‘, ‘编辑代言词‘, btnArray, function (e) {
if (e.index == 1) {
var value = $(‘.mui-popup-input textarea‘).val();
if (e.index == 1) {
$("#ipt_endorsing").html(value);
}
else {

}
}
}, ‘div‘);
$(‘.mui-popup-input‘).html(‘‘);
$(‘.mui-popup-input‘).append(‘<textarea placeholder="编辑代言词">‘ + $("#ipt_endorsing").html() + ‘</textarea>‘)
});

mui弹窗input变成textarea

原文:https://www.cnblogs.com/yyy251/p/9269725.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!