Skip to content

Instantly share code, notes, and snippets.

@jamesona jamesona/prompt.js
Created Apr 17, 2015

Embed
What would you like to do?
var Prompt = function(prompt){
var box = document.createElement('textarea');
box.placeholder = prompt;
box.style.width = "30vw";
box.style.height = "60vh";
box.style.marginTop = "20vh";
box.style.marginLeft = "35vw";
box.style.position = "fixed";
box.style.left = "0";
box.style.top = "0";
box.style.zIndex = "9999999";
box.oninput = function(){
box.parentNode.removeChild(box);
changed = true;
};
document.body.appendChild(box);
return box;
}
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.