Shared conversation
ChatGPT ·
html 创建一个表格 输入 xxx 点击按钮访问 https://mailsac.com/inbox/[email protected]
ChatGPT
Poe
以下是一个简单的 HTML 表单,可以让用户输入一个 xxx 值,并在点击按钮时访问 https://mailsac.com/inbox/[email protected]:
html
<!DOCTYPE html>
<html>
<head>
<title>访问邮箱</title>
</head>
<body>
<h1>访问邮箱</h1>
<form>
<label for="email">请输入 xxx:</label>
<input type="text" id="email" name="email"><br><br>
<input type="button" value="访问邮箱" onclick="location.href='https://mailsac.com/inbox/'+document.getElementById('email').value+'@devops.rr.nu';">
</form>
</body>
</html>
在这个表单中,用户需要输入 xxx 值,这个值将会被拼接到 https://mailsac.com/inbox/[email protected] 的 URL 中,然后页面会跳转到该 URL。在按钮的 onclick
属性中,我们使用了 JavaScript 来获取输入框中的值,并将其拼接到 URL 中,然后使用 location.href
来实现跳转。
This conversation may have been edited by the sharer.