以下は、ファイル入力と[ファイルのクリア]ボタンを表示するjqueryコードの一部です。
var $imagefile = $('<input />').attr({
type: 'file',
name: 'imageFile',
class: 'imageFile'
});
$image.append($imagefile);
var $imageclear = $('<input />').attr({
type: 'button',
name: 'imageClear',
class: 'imageClear',
value: 'Clear File'
});
$image.append($imageclear);
「ファイルをクリア」ボタンがある理由は、ボタンをクリックすると、ファイル入力にあるものがすべてクリアされるためです。「ファイルのクリア」ボタンをクリックしたときに実際にファイル入力をクリアするようにコーディングするにはどうすればよいですか?