<html>
<head>
<title>inputnone</title>
<style>
</style>
<!--不需要再次引用jquery-->
<script type="text/javascript" src="http://code.jquery.com/jquery-1.7.2.min.js"></script>
<script type="text/javascript">
</script>
</head>
<body>
<div style="margin-left:200px;margin-top:100px;">
<input type="text" id="text1">
//accept=".jpg,.png"
<input type="file" id="file" accept=".jpg,.png">
</div>
</body>
</html>
结果: