Skip to content

Instantly share code, notes, and snippets.

@RshStone
Last active August 5, 2020 03:48
Show Gist options
  • Save RshStone/270c560d5e7e5b18a7c261f72a5be154 to your computer and use it in GitHub Desktop.
Save RshStone/270c560d5e7e5b18a7c261f72a5be154 to your computer and use it in GitHub Desktop.
abNbmXy
<script src = "https://www.dukelearntoprogram.com//course1/common/js/image/SimpleImage.js">
</script>
<h1>Image Practice</h1>
<canvas id = "cans"></canvas>
<p>
Filename
<input type = "text" id = "input">
<input type = "button" value = "upload" onclick = upload()>
</p>
function upload(){
var fileinput = document.getElementById("input");
var filename = fileinput.value;
alert("You chooce " + filename);
}
#input{
width:225px;
font-size: 12pt;
}
canvas{
height:200px;
width:350px;
border: 1px solid lightgrey;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment