Skip to content
This repository was archived by the owner on Mar 8, 2025. It is now read-only.

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
Robkent authored Jul 12, 2024
1 parent 71e9e13 commit 61ee11c
Showing 1 changed file with 14 additions and 11 deletions.
25 changes: 14 additions & 11 deletions browser.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
const button = document.getElementById("button");
const input = document.getElementById("input");
const a = document.getElementById("a");
const h1 = document.getElementById("h1");
var button = document.getElementById("button");
var input = document.getElementById("input");
var a = document.getElementById("a");
var h1 = document.getElementById("h1");
//document.addEventListener('DOMContentLoaded', () => {
//document.getElementById('myLink').href = 'https://newexample.com';
const go = () =>{
let num = input.value.length;
h1.textContent = "go to website"
a.href = input.value;
}

button.addEventListener("click",go)
var go = function go() {
var num = input.value.length;
h1.textContent = "go to ".concat(input.value);
a.href = input.value;
};
var clear = function clear() {
h1.textContent = "";
};
button.addEventListener("click", go);
a.addEventListener("click", clear);

0 comments on commit 61ee11c

Please sign in to comment.