实例首页
自学教程
IT工具箱
源代码
下载代码
上下布局
点击运行 >
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>html form accept 实例 - 自学教程(runoops.com)</title> </head> <body> <form action="//demo.runoops.com/php/demo-form.php" accept="image/gif, image/jpeg"> First name: <input type="text" name="fname"><br> Last name: <input type="text" name="lname"><br> Your image: <input type="file" name="pic" id="pic"><br> <input type="submit" value="提交"> </form> <p><b>注意:</b>几乎所有的主流浏览器都不支持 accept 属性。</p> </body> </html>
运行结果: