创建一个跟旅游有关的正则表达式的HTML登录界面
时间: 2023-07-26 07:03:29 浏览: 35
以下是一个基本的HTML登录界面,其中包含一个跟旅游有关的正则表达式输入框:
```html
<!DOCTYPE html>
<html>
<head>
<title>Travel Login</title>
</head>
<body>
<form>
<label for="username">Username:</label>
<input type="text" id="username" name="username"><br><br>
<label for="password">Password:</label>
<input type="password" id="password" name="password"><br><br>
<label for="destination">Destination:</label>
<input type="text" id="destination" name="destination" pattern="(^[A-Z][a-z]+\s)+[A-Z][a-z]+$"><br><br>
<input type="submit" value="Login">
</form>
</body>
</html>
```
在上面的代码中,输入框的`id`分别为`username`、`password`和`destination`。其中,`destination`输入框使用了正则表达式,要求输入的内容必须是一个或多个以大写字母开头的单词(每个单词的首字母大写,其余字母小写),中间用一个空格隔开,最后以一个以大写字母开头的单词结尾,例如:"New York City"。
您可以将此代码复制到您的文本编辑器中,并进行必要的修改和样式设置,以适应您的项目需求。