当前位置: 首页 > news >正文

怎么做淘宝返利网站吗信息流广告投放流程

怎么做淘宝返利网站吗,信息流广告投放流程,浙江网站建设专家评价,wordpress 5.2设置中文下面是使用HTML和JavaScript实现的一个中文版登录界面&#xff0c;包含登录、注册和修改密码功能。注册成功后会显示提示信息&#xff0c;在登录成功后进入一个大大的欢迎页面。 1.代码展示 <!DOCTYPE html> <html lang"zh-CN"> <head><meta …

下面是使用HTML和JavaScript实现的一个中文版登录界面,包含登录、注册和修改密码功能。注册成功后会显示提示信息,在登录成功后进入一个大大的欢迎页面。

1.代码展示

<!DOCTYPE html>
<html lang="zh-CN">
<head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><title>用户认证系统</title><style>body {font-family: Arial, sans-serif;display: flex;justify-content: center;align-items: center;height: 100vh;background-color: #f4f4f9;}.container {width: 300px;padding: 20px;background-color: white;box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);border-radius: 5px;text-align: center;}h2 {margin-bottom: 20px;}form {display: flex;flex-direction: column;}input[type="text"],input[type="password"] {margin-bottom: 10px;padding: 10px;border: 1px solid #ccc;border-radius: 5px;width: 100%;}button {padding: 10px;background-color: #007bff;color: white;border: none;border-radius: 5px;cursor: pointer;width: 100%;}button:hover {background-color: #0056b3;}.message {margin-top: 10px;}.success {color: green;}.error {color: red;}#welcome-container {width: 400px;padding: 40px;background-color: #d4edda;box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);border-radius: 10px;text-align: center;}#welcome-message {font-size: 24px;margin-bottom: 20px;}</style>
</head>
<body><div class="container" id="login-container"><h2>登录</h2><form id="login-form"><input type="text" id="login-username" placeholder="用户名" required><input type="password" id="login-password" placeholder="密码" required><button type="submit">登录</button></form><p class="message error" id="login-error"></p><p class="message"><a href="#" onclick="showRegisterForm(); return false;">注册新账号</a></p></div><div class="container" id="register-container" style="display: none;"><h2>注册</h2><form id="register-form"><input type="text" id="register-username" placeholder="用户名" required><input type="password" id="register-password" placeholder="密码" required><button type="submit">注册</button></form><p class="message success" id="register-success"></p><p class="message error" id="register-error"></p><p class="message"><a href="#" onclick="showLoginForm(); return false;">返回登录</a></p></div><div class="container" id="change-password-container" style="display: none;"><h2>修改密码</h2><form id="change-password-form"><input type="password" id="old-password" placeholder="旧密码" required><input type="password" id="new-password" placeholder="新密码" required><button type="submit">修改密码</button></form><p class="message error" id="change-password-error"></p><p class="message"><a href="#" onclick="showWelcomePage(); return false;">返回欢迎页面</a></p></div><div id="welcome-container" style="display: none;"><h2 id="welcome-message"></h2><button onclick="showChangePassword()">修改密码</button><button onclick="logout()">注销</button></div><script>let users = [];let currentUser = null;document.getElementById('login-form').addEventListener('submit', function(event) {event.preventDefault();const username = document.getElementById('login-username').value;const password = document.getElementById('login-password').value;const user = users.find(user => user.username === username && user.password === password);if (user) {currentUser = user;showWelcomePage();} else {document.getElementById('login-error').textContent = '无效的用户名或密码';}});document.getElementById('register-form').addEventListener('submit', function(event) {event.preventDefault();const username = document.getElementById('register-username').value;const password = document.getElementById('register-password').value;if (!users.find(user => user.username === username)) {users.push({ username, password });document.getElementById('register-success').textContent = '注册成功!';setTimeout(() => {document.getElementById('register-success').textContent = '';}, 3000);document.getElementById('register-username').value = '';document.getElementById('register-password').value = '';showLoginForm();} else {document.getElementById('register-error').textContent = '用户名已存在';}});document.getElementById('change-password-form').addEventListener('submit', function(event) {event.preventDefault();const oldPassword = document.getElementById('old-password').value;const newPassword = document.getElementById('new-password').value;if (currentUser && currentUser.password === oldPassword) {currentUser.password = newPassword;users = users.map(user => user.username === currentUser.username ? { ...user, password: newPassword } : user);document.getElementById('change-password-error').textContent = '密码修改成功';setTimeout(() => {document.getElementById('change-password-error').textContent = '';}, 3000);hideChangePassword();} else {document.getElementById('change-password-error').textContent = '旧密码不正确';}});function showWelcomePage() {document.getElementById('login-container').style.display = 'none';document.getElementById('register-container').style.display = 'none';document.getElementById('change-password-container').style.display = 'none';document.getElementById('welcome-container').style.display = 'block';document.getElementById('welcome-message').textContent = `欢迎, ${currentUser.username}`;}function logout() {currentUser = null;document.getElementById('welcome-container').style.display = 'none';document.getElementById('login-container').style.display = 'block';}function showRegisterForm() {document.getElementById('login-container').style.display = 'none';document.getElementById('register-container').style.display = 'block';document.getElementById('login-error').textContent = ''; // Clear login error message}function showLoginForm() {document.getElementById('register-container').style.display = 'none';document.getElementById('login-container').style.display = 'block';document.getElementById('register-success').textContent = ''; // Clear registration success messagedocument.getElementById('register-error').textContent = ''; // Clear registration error message}function showChangePassword() {document.getElementById('welcome-container').style.display = 'none';document.getElementById('change-password-container').style.display = 'block';}function hideChangePassword() {document.getElementById('change-password-container').style.display = 'none';document.getElementById('welcome-container').style.display = 'block';}</script>
</body>
</html>

2.功能说明:

这个应用程序使用纯HTML和JavaScript实现。

  • 包含登录、注册和修改密码功能。
  • 注册成功后会显示一条绿色的成功消息,并在3秒后自动消失。
  • 登录成功后,用户会被带到一个大大的欢迎页面。
  • 用户可以点击“注销”按钮退出登录。
  • 提供了从登录页面跳转到注册页面和从注册页面返回登录页面的链接。
  • 欢迎页面中有一个“修改密码”的按钮,可以跳转到修改密码页面。

3.效果图

在这里插入图片描述

http://www.hkea.cn/news/906479/

相关文章:

  • 杭州营销网站建设东莞网站建设哪家公司好
  • 企业做营销型网站手机如何制作网页
  • 连云港网站关键词优化seo自学教程
  • 网站全站出售淘宝关键词排名怎么查询
  • 龙口市规划建设局网站查询收录
  • 学校网站建设注意什么东莞网站营销推广
  • 网站设计模板是什么百度网盘人工客服电话多少
  • wordpress文章收缩长春seo优化企业网络跃升
  • 网站地图调用希爱力双效片骗局
  • 珠海网站建设维护友情链接买卖代理
  • 武汉企业网站推广外包网络广告营销案例分析
  • 深圳哪里有做网站的汕头seo排名收费
  • 如何用腾讯云主机做网站株洲发布最新通告
  • 中国建设银行官网站下载信息流广告投放公司
  • 合肥建站平台网络平台推广是干什么
  • 黄冈工程建设标准造价信息网优化工作流程
  • 怎么做服装外贸网站怎么去推广一个产品
  • 和各大网站做视频的工作总结软件推广赚佣金渠道
  • asp.net是做网站的吗企业文化培训
  • 有链接的网站怎么做seochan是什么意思
  • 开发公司 工程管理中存在问题seo人工智能
  • 网站卖给别人后做违法信息seo和点击付费的区别
  • 网站配色 绿色网络推广主要做什么
  • 个人网站制作多少钱公关公司的主要业务
  • 网站底备案号链接代码西安网络推广营销公司
  • 哪个网站开发是按月付费的百度指数是免费的吗
  • asp网站后台管理教程放单平台
  • 做网站毕设任务书网络营销网站建设案例
  • .net 企业网站 模版关键词seo深圳
  • 网站建设优化价格网站seo诊断