JSFiddle - React, Tailwind, and code Playground
by marifrahman
HTML
<link rel="stylesheet" href="http://twitter.github.com/bootstrap/assets/css/bootstrap.css">
<link rel="stylesheet" href="http://twitter.github.com/bootstrap/assets/css/bootstrap-responsive.css">
<link rel="stylesheet" href="http://blueimp.github.com/jQuery-File-Upload/css/jquery.fileupload-ui.css">
<span class="btn btn-success btn-mini fileinput-button" >
<span>Add File</span>
<input id="the_real_file_input" type="file" name="rsdfiles[]">
</span><span id="filename"></span>
JavaScript
$('input[type=file]').bind('change', function() {
var str = "";
str = $(this).val();
file = str.substr(str.lastIndexOf('\\') + 1);
$("#filename").text(file);
}).change();