<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Dynamic Iframe Link Changer</title>
<style>
body {
font-family: 'Segoe UI', sans-serif;
background: #f0f2f5;
display: flex;
flex-direction: column;
align-items: center;
padding: 2em;
}
h2 {
color: #333;
margin-bottom: 1em;
}
.input-group {
margin-bottom: 1em;
display: flex;
gap: 0.5em;
}
input {
padding: 0.5em 1em;
width: 300px;
border: 1px solid #ccc;
border-radius: 8px;
font-size: 1em;
}
button {
padding: 0.5em 1em;
background-color: #007bff;
color: white;
border: none;
border-radius: 8px;
cursor: pointer;
transition: background 0.3s;
}
button:hover {
background-color: #0056b3;
}
iframe {
border: 1px green;
width: 90%;
max-width: 800px;
height: 400px;
border-radius: 12px;
box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}
</style>
</head>
<body>
<h2>
Link Loader
</h2>
<input id="a" type="text" placeholder="Enter URL">
<button onclick="changeIframe()">Load</button>
<iframe id="myFrame" src="https://google.com" width="600" height="400"></iframe>
<script>
function changeIframe() {
let url = document.getElementById("a").value;
document.getElementById("myFrame").src = url;
}
document.body.addEventListener("keypress", function(event) {
if (event.key === "Enter") {
changeIframe();
}
});
</script>
</body>
</html>
It cannot load alot of things also sorry...