ได้สิ HTML5 เค้าคิดมาแล้ว ง่ายเหมือนไม่ต้องทำอะไรเลยล่ะ ดู code เลยละกัน
<!doctype html5>
<html manifest="cache.manifest">
<link rel="stylesheet" href="reset.css" type="text/css" />
<link rel="stylesheet" href="index.css" type="text/css" />
<script src="jquery-1.6.min.js"></script>
<script src="underscore-min.js"></script>
<script src="index.js"></script>
<script>
</script>
<body>
<header class="banner"><h1>HTML5 Photos</h1></header>
<section class="entry">
<input type="file" accept="image/*;capture=camera">
<div class="latest">
<div class="menu">
<span class="command">save</span>
</div>
<img />
</div>
</section>
<section class="album">
<header><h1>Album</h1> <span class="empty command">clear</span></header>
<div class="photos">
<script type="x-template" id="photoTemplate">
<div class="photo">
<div class="menu">
<span><%= name %></span>
<span class="command open">open</span>
</div>
<img src="<%= url %>">
</div>
</script>
</div>
</section>
</body>
</html>
คำสำคัญ <input type="file" accept="image/*;capture=camera">
ที่มาและตัวอย่าง http://html5photos.appspot.com/
คำค้น Can you launch the native Camera App from an Html 5 Web App?
0 ความคิดเห็น