The best you can do (natively) is to check which file was selected :
<input id="uploadFile" type="file" onchange="FileSelected(this)" />
Script :
function FileSelected(sender)
{
if (check(sender.value)) //check is you function to check extension
{...}
else
{...}
}
Sample code : ( check only jpg)
http://jsbin.com/sibose/2/edit
Edit
in chrome . ie10 you can do :
<!-- (IE 10+, Chrome) -->
<input type="file" accept=".xls,.xlsx">
With FF :
<!-- (IE 10+, Chrome, Firefox) -->
<input type="file"
accept="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,application/vnd.ms-excel" />
demo : http://jsbin.com/jihoku/2/edit