HTML code script for DNS Lookup

Created on 3 July, 2024 • 75 views

HTML code script for DNS Lookup

<!DOCTYPE html>

<html>

<head>

<title>DNS Lookup Tool</title>

<script>

function performLookup() {

 var domainName = document.getElementById("domain").value;

 // Simulate a lookup (not secure, for demonstration only)

 var ipAddress = "Simulating lookup... (This wouldn't work in a real scenario)";

 document.getElementById("result").innerHTML = "IP Address: " + ipAddress;

}

</script>

</head>

<body>

<h1>DNS Lookup Tool</h1>

<p>Enter a domain name:</p>

<input type="text" id="domain">

<button onclick="performLookup()">Lookup</button>

<p id="result"></p>

</body>

</html>