how to print book mark maker by using dom maipulation
<!DOCTYPE html>
<html lang="en">
<head>
<title>Site Bookmarker</title>
<link rel="stylesheet" type="text/css" href="style.css">
</head>
<body>
<h1>Site Bookmarker</h1>
<div class="container">
<form class="form" action="#">
<div class="input-field">
<label for="site">Name</label>
<input name="site" type="text" placeholder="site name">
</div>
<div class="input-field">
<label for="url">URL</label>
<input name="url" type="text" placeholder="https://www.foobar.com">
</div>
<button class="save_button">Save</button>
</form>
<h2>Book Marks</h2>
<div class="bookmarks"></div>
</div>
<script type="text/javascript">
var button = document.querySelector(".save_button");
var siteName = document.querySelector("[name='site']");
var url = document.querySelector("[name='url']");
var bookmarksSection = document.querySelector(".bookmarks");
if (typeof (localStorage.bookmark) == "undefined") {
localStorage.bookmark = "";
}
</script>
</body>
</html>
Comments
Leave a comment