2013-09-25 44 views

回答

0

DEMO

使用這個插件masked-input-plugin/

plugins jquery link

github link

$(function() { 
    $(".percent").mask("9?9%"); 
    $(".percent").on("blur", function() { 
     var value = (this.value.length == 1) ? this.value + '%' : this.value; 
     $(this).val(value); 
    }) 
}); 
+0

如果可能,我想堅持使用原來的插件。這個當前插件是不可能的? – user660734