jquery实现简洁文件上传表单样式

2020-05-24 21:37:47易采站长站整理

input[type=text]::-webkit-focus-inner{padding:0; border:0 none; -webkit-box-sizing:content-box;}

javascript部分代码:


<script>$(function(){
$("input[type=file]").change(function(){$(this).parents(".uploader").find(".filename").val($(this).val());});
$("input[type=file]").each(function(){
if($(this).val()==""){$(this).parents(".uploader").find(".filename").val("No file selected...");}
});
});
</script>

下载地址:  jquery实现简洁文件上传表单样式

希望这款简洁实用的jquery实现文件上传表单样式大家会喜欢,并可以应用到自己的项目中。