我正在使用html 5 <input type="file" accept="image/*;capture=camera"/>
文件元素的網絡移動 照片它工作正常,但我怎麼處理file.value發送到Web服務或數據庫? 這裏是移動設備的演示Demo link捕獲的圖像與移動設備的HTML5
這裏是我的代碼,但不工作 我不能得到文件上傳值
<html>
<script>
function getPhoto()
{
alert('2');
var fu1 = document.getElementById("myfile").value;
alert("You selected " + fu1);
}
</script>
<body>
<form>
<input type="file" name="myfile" accept="image/*;capture=camera"/>
<input type="submit"/>
<input type="button" value="get Photo path" onclick="getPhoto()">
</form>
</body>
</html>
喜robertc我加入我的代碼 –
應該是'接受=「圖像/ *」捕獲=「相機」'我猜? http://dev.opera.com/articles/view/media-capture-in-mobile-browsers/ –