编辑下面的代码:【加编码】
<html> <body> <form action="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="Submit"> </form> <p><b>Note:</b> The accept attribute is not supported in any of the major browsers.</p> </body> </html>
结果: 【此窗口】 帮助?
Try it Yourself - © 自强学堂