Skip to content

Instantly share code, notes, and snippets.

@thaenor
Created April 15, 2017 15:59
Show Gist options
  • Save thaenor/d36457e937d05ce1c1bd0fa34df85c12 to your computer and use it in GitHub Desktop.
Save thaenor/d36457e937d05ce1c1bd0fa34df85c12 to your computer and use it in GitHub Desktop.
JS Bin // source https://jsbin.com/mecoxa
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
</head>
<body>
<input id="filep" type="file" onchange="foo()">
<div id="result"></div>
<button onclick="remove()">delete</button>
<script id="jsbin-javascript">
function foo(){
renderFileList();
}
function remove(){
document.getElementById("filep").value="";
renderFileList();
}
function renderFileList(){
document.getElementById("result").innerHTML = document.getElementById("filep").value;
}
</script>
<script id="jsbin-source-javascript" type="text/javascript">function foo(){
renderFileList();
}
function remove(){
document.getElementById("filep").value="";
renderFileList();
}
function renderFileList(){
document.getElementById("result").innerHTML = document.getElementById("filep").value;
}</script></body>
</html>
function foo(){
renderFileList();
}
function remove(){
document.getElementById("filep").value="";
renderFileList();
}
function renderFileList(){
document.getElementById("result").innerHTML = document.getElementById("filep").value;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment