i-eat.rocks/site/apps/windowgen.html

26 lines
930 B
HTML
Raw Permalink Normal View History

2024-08-16 00:13:37 +00:00
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
2024-08-16 05:45:22 +00:00
<link rel="stylesheet" href="standard.css">
2024-08-16 00:13:37 +00:00
</head>
<body>
<form id="form">
2024-08-16 05:45:22 +00:00
<input id="url" type="url" placeholder="url" required>
<input id="titl" type="text" placeholder="title">
2024-08-16 05:45:22 +00:00
<input id="wid" type="number" placeholder="width" required>
<input id="hei" type="number" placeholder="height" required>
<button>submit</button>
2024-08-16 00:13:37 +00:00
</form>
<script>
document.getElementById("form").addEventListener("submit", event => {
event.preventDefault()
2024-08-18 03:17:43 +00:00
window.parent.postMessage(`win ${document.getElementById("url").value} ${document.getElementById("titl").value} ${document.getElementById("wid").value} ${document.getElementById("hei").value}`)
2024-08-16 00:13:37 +00:00
})
</script>
</body>
</html>