This commit is contained in:
Boof 2023-01-09 14:05:39 +01:00 committed by GitHub
parent bc056438a3
commit 59d61abf8b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 14 additions and 1 deletions

View File

@ -9,6 +9,7 @@
<link rel="icon" type="image/x-icon" href="data/images/logoround.png">
<link rel="stylesheet" href="data/style.css">
<script src="index.js" defer></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
</head>
<body>
@ -95,6 +96,7 @@
<input name="subject" id="subject" type="text">
<label for="message">message</label>
<textarea name="message" id="email" id="contact-form-message" rows="3" required></textarea>
<input value="" name="formip" id="formip" type="hidden" required>
<button type="submit">Send Message</button>
</form>
</div>

View File

@ -22,4 +22,14 @@ navMenu.addEventListener('click', navShow);
const year = new Date().getFullYear();
document.querySelector('.current-year').innerText = year;
document.querySelector('.current-year').innerText = year;
//Get user ip to put it in the contact form
$.getJSON("https://api.ipify.org?format=json", function(getip) {
var userip = (getip.ip);
//$("#gfg").html(getip.ip);
document.getElementById("formip").value = userip;
})

View File

@ -9,6 +9,7 @@
<link rel="icon" type="image/x-icon" href="/data/images/logoround.png">
<link rel="stylesheet" href="/data/style.css">
<script src="/index.js" defer></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
</head>
<body>