x-editable + maskedinput在输入时从maskedinput返回下划线但是当我点击时它不会。关于如何解决这个问题的任何想法?
的jsfiddle:
jQuery Library:
HTML:
<a href="#" data-pk="1">1</a>
JS:
$('a').editable({
type: 'text',
name: 'username',
tpl: '<input type="text" id ="zipiddemo" class="mask form-control input-sm dd" style="padding-right: 24px;">'
});
$(document).on("focus", ".mask", function () {
$(this).mask("?999");
});
答案 0 :(得分:0)
<强>的jsfiddle:强>
<强> HTML:强>
<a href="#" data-pk="1">1</a>
<强> JS:强>
$('a').editable({
type: 'text',
name: 'username',
tpl: '<input type="text" id ="zipiddemo" class="mask form-control input-sm dd" style="padding-right: 24px;">',
display: function(value, response) {
return false;
},
success: function(response, newValue) {
$(this).html(newValue.replace(/_/g, ''));
},
});
$(document).on("focus", ".mask", function() {
$(this).mask("?999");
});