A Pen by Justin Shi on CodePen.
Last active
August 5, 2020 03:48
-
-
Save RshStone/270c560d5e7e5b18a7c261f72a5be154 to your computer and use it in GitHub Desktop.
abNbmXy
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
<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> |
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
function upload(){ | |
var fileinput = document.getElementById("input"); | |
var filename = fileinput.value; | |
alert("You chooce " + filename); | |
} |
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
#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