I have two option in prompt, acept and cancel, here is ok, but when I do cancel in prompt, this generate a list of anyway, why not function?
add.onclick = function(){
if(true) {
var itemText = prompt('Create a Memo');
}else {
return false;
}
DEMO
Another example:
DEMO 2