localStorageDemo

by rvaldez

HTML

<div id="intro" class="jumbotron">
        <h1>Somethnig</h1>
        <p class="lead">

        <div class="controls">
            <input class="span7 " type="text" placeholder=" " name="key">
        </div>
        <div>
            <button class="btn btn-large btn-success" onclick="remove('intro')">
                 Search
            </button>
        </div>
    </div>

CSS

body { font-family : tahoma }
h2 { font-weight: bold; border-bottom: 2px solid gray; margin-bottom:10px}
#data { border: 1px solid grey; min-height:20px; }

JavaScript

function remove(id) {
            //get the element node
            element = document.getElementById(id);

            //remove the element from the document
            document.removeChild(element);
        }