Search
 
SCRIPT & CODE EXAMPLE
 

HTML

changeable href

<input id="input" type="url"></input>
<button id="link button"><a id="link" style="text-decoration: none; color: inherit;" href="" TARGET="_BLANK">enter</a></button>
<script src="script.js">
    var linkButton = document.getElementById("link button")
    linkButton.onclick = function(){
        var input = document.getElementById("input").value
        document.getElementById("link").setAttribute("href", "http://"+input)
    }
</script>
Comment

PREVIOUS NEXT
Code Example
Html :: turn of blur html canvas 
Html :: how to check where was the changes in a perticuler commit git 
Html :: how to create html dropdown 
Html :: event input svelte 
Html :: html iframe tag 
Html :: if else handlebars 
Html :: form with no action 
Html :: how to protect + embed google drive video html5 
Html :: ico html 
Html :: change the text of input file in html 
Html :: how inside a word or sentence in circle border in html 
Html :: embed tag youtube 
Html :: jquery append html to top of div 
Html :: How can I include python script in a HTML file? 
Html :: how to stop text in html from becoming a link 
Html :: disable autocomplete on input 
Html :: how to define tag icon in html 
Html :: data list in input tag html 
Html :: html fax 
Html :: check if javascript is enabled 
Html :: thymeleaf import in html 
Html :: how to get rid how white border on html page 
Html :: button navigate to page 
Html :: pink floyd hey you 
Html :: css force string to wrap 
Html :: check if select option is selected javascript 
Html :: font awsome 
Html :: how to remove fieldset border in html 
Html :: how to make a div in html 
Html :: Description For Page html 
ADD CONTENT
Topic
Content
Source link
Name
3+6 =