Skip to content

Instantly share code, notes, and snippets.

@M507
Created November 25, 2023 21:30
Show Gist options
  • Select an option

  • Save M507/fe258d493479d57091b061b3ca566f15 to your computer and use it in GitHub Desktop.

Select an option

Save M507/fe258d493479d57091b061b3ca566f15 to your computer and use it in GitHub Desktop.
clickjacking.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>URL Opener</title>
</head>
<body>
<h1>URL Opener</h1>
<label for="urlInput">Enter URL:</label>
<input type="text" id="urlInput" placeholder="https://example.com">
<button onclick="openURL()">Open</button>
<br><br>
<iframe id="urlFrame" width="800" height="600" frameborder="0"></iframe>
<script>
function openURL() {
var url = document.getElementById('urlInput').value;
document.getElementById('urlFrame').src = url;
}
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment