Created
May 10, 2023 00:21
-
-
Save andrewjcurrie/5fd8e1f68d46e9f3cf39d74bb60dbece to your computer and use it in GitHub Desktop.
IPv4 Address Validator
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<title>JavaScript IPv4 Address Validator</title> | |
<link rel="stylesheet" type="text/css" href="style.css"> | |
</head> | |
<body onload='document.ipform.ipaddr.focus()'> | |
<div class="container"> | |
<h2>Enter an IP address then click 'Validate'</h2> | |
<form name="ipform" action="#"> | |
<ul> | |
<li><input type='text' name='ipaddr'/></li> | |
<li> </li> | |
<li class="submit"> | |
<button onclick="ValidateIPaddress(document.ipform.ipaddr)">VALIDATE</button> | |
</li> | |
<li> </li> | |
</ul> | |
</form> | |
</div> | |
<script type="text/javascript" src="validator.js"></script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment