accept是你自己编出来的。并且type="file"不能完成你所述功能。

解决方案 »

  1.   

    楼主没说错,但是对于这个属性,我也从来没有成功应用过ACCEPT Attribute | accept Property--------------------------------------------------------------------------------Sets or retrieves a comma-separated list of content types.SyntaxHTML <INPUT ACCEPT = sAccept... >  
    Scripting INPUT.accept(v) [ = sAccept ] Possible ValuessAccept String that specifies or receives comma-separated list of content types. The property is read/write. The property has no default value.ResThe information from the list can be used to filter out nonconforming files when prompting a user to select files to be sent to the server using the <INPUT> element with type="file".Examples of content types include "text/html", "image/png", "image/gif", "video/mpeg", "audio/basic", "text/tcl", "text/javascript", and "text/vbscript". For the current list of registered Multipurpose Internet Mail Extensions (MIME) types, see MIME types . There is no functionality implemented for this property unless defined by the author.Standards InformationThis property is defined in HTML 4.0  and is defined in World Wide Web Consortium (W3C) Document Object Model (DOM) Level 1 . Applies ToINPUT 
    Platform Version 
    Win32: 6 
    Version data is listed when the mouse hovers over a link, or the link has focus. 
     INPUT 
      

  2.   

    <INPUT NAME="fileName" TYPE=FILE ACCEPT=""image/jpg">
      

  3.   

    楼上的
        用<INPUT NAME="fileName" TYPE=FILE ACCEPT=""image/jpg">不行啊!在浏览的时候什么文件都看得见(exe、txt、doc......)我想要的是浏览的时候只能看见、选择jpg类型的图片
      

  4.   

    我个人认为ACCEPT属性是针对数据获取方式的,并不是一般意义上的文件属性,所以楼主的要求用这个方法是不能达到的。
      

  5.   

    请问xdspower,用什么方法能够实现类似功能?谢谢!
      

  6.   

    大家多多发表自己的看法啊! 没关系 ~~  UP UP  UP  ^_^