// input宽度自适应
$("input[type='text']").each(function () {
var valueLength = $(this).val().length;
if (valueLength > 4) {
$(this).css('width', valueLength * 12 + 'px')
}
$(this).keydown(function(){
var valueLength = $(this).val().length;
if (valueLength > 4) {
$(this).css('width', valueLength * 12 + 'px')
}
});
});