这是上传的表格。
<form class="alert alert-info">
<div>
<b id = "select_file" class="span3" style="font-weight: bold; cursor: pointer; ">Please select image</b>
<input class="span3" type="file" name="image_file" id="image_file" style="display:none " />
<input disabled="true" type="button" value="Upload image" class="btn" />
</div>
</form>
我使用以下脚本打开一个包含文件的窗口。我想在<b id = 'select_file'>
.
我怎样才能做到这一点?
$('#select_file').click(function(){
var _this = $(this);
$('#image_file').show().focus().click().hide();
var filename = $('#image_file').val();
_this.html(filename);
$('.btn').attr('disabled', false);
});