<script>
function text()
{
// Retrieve image file location from specified source
navigator.camera.getPicture(onSuccess, onFail,
{
quality: 50,
destinationType: Camera.DestinationType.FILE_URI,
sourceType: navigator.camera.PictureSourceType.PHOTOLIBRARY
});
}
function onSuccess(imageData)
{
alert('success image date ='+imageData);
document.getElementById('myImage').src=imageData;
}
function onFail(message)
{
alert('Failed because: ' + message);
}
当我从 File_Uri 获取图片的路径时,但使用此网址无法获取图片。
该路径与content://com.android.providers.media.documents/document/image%3a39762
<img id"myImage" alt="choosed images" height="200" width="200">