Edit The Code:
See Result »
Try it Yourself - ©
w3big.com
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>本教程(w3big.com)</title> </head> <body> <form action="demo_form.php"> <input type="file" name="pic" accept="image/*"> <input type="submit"> </form> <p><strong>注意:</strong>Internet Explorer 9 及之前的版本都不支持 input 标签的 accept 属性。</p> <p><strong>注意:</strong>由于安全问题,这个例子将不允许您上传文件。</p> </body> </html>