Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
* The first commented line is your dabblet’s title
background: #f06;
background: linear-gradient(45deg, #f06, yellow);
min-height: 100%;
<form action="/abc" method="post">
<input type="hidden" id="imgData">
<img id="img1" src="" alt="">
<button type="submit">submit</button>
document.onpaste = function(event){
var items = (event.clipboardData || event.originalEvent.clipboardData).items;
var blob = items[0].getAsFile();
var reader = new FileReader();
reader.onload = function(event){
document.getElementById("img1").src =;
document.getElementById("imgData").value =;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.