1001>>
<tr>
<td height="25" align="right">
传真件:
</td>
<td >
<asp:FileUpload ID="FileUpload1" onpropertychange="ck(this)" runat="server" Width="350px" />
</td>
</tr>
1002>
<script>
function ck(obj){if(obj.value.length>0){
var af="jpg,gif,png,jpeg,bmp";
if(eval("with(obj.value)if(!/"+af.split(",").join("|")+"/ig.test(substring(lastIndexOf('.')+1,length)))1;"))
{alert("允许上传的文件类型:/n"+af);obj.createTextRange().execCommand('delete')};
}
}
</script>