Based on some other code I found from this site (This Question here - Get URL and save it | Chrome Extension) I was wondering on how to display the URL of a current page in a input box. My coding is below
<html>
<head>
<link href="style.css" rel="stylesheet" type="text/css" />
<script>
chrome.tabs.getSelected(null, function(tab) {
document.getElementById('currentLink').innerHTML = tab.url;
});
</script>
</head>
<body>
<div class="links">
<div id="currentLink">Getting Current URL...</div>
<input type="text" id="currentLink" value="Loading...">
</div>
</body>
</html>
(I've cut some features out). But my question is, how can I get the URL to display in the input box, it displays when I use "div id" but not when I use "input id" any ideas why?