Created
March 3, 2015 20:41
-
-
Save anonymous/09d4cd8134afe8a53d50 to your computer and use it in GitHub Desktop.
Hello World // source http://jsbin.com/diquxocesa
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<meta charset="utf-8" /> | |
<meta name="format-detection" content="telephone=no" /> | |
<meta name="msapplication-tap-highlight" content="no" /> | |
<!-- WARNING: for iOS 7, remove the width=device-width and height=device-height attributes. See https://issues.apache.org/jira/browse/CB-4323 --> | |
<meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width, height=device-height, target-densitydpi=device-dpi" /> | |
<link rel="stylesheet" type="text/css" href="css/index.css" /> | |
<title>Hello World</title> | |
</head> | |
<body> | |
<div class="app"> | |
<h1 id="demo">Demo</h1> | |
<script type="text/javascript"> | |
document.addEventListener("deviceready", onDeviceReady, false); | |
function onDeviceReady() { | |
navigator.camera.getPicture(onSuccess, onFail, { quality: 50, | |
destinationType: Camera.DestinationType.FILE_URI | |
}); | |
function onSuccess(imageURI) { | |
var image = document.getElementById('myImage'); | |
image.src = imageURI; | |
} | |
function onFail(message) { | |
alert('Failed because: ' + message); | |
} | |
} | |
</script> | |
<image id="myImage" /> | |
</div> | |
<script type="text/javascript" src="cordova.js"></script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment