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

做磁力解析网站seo网页优化平台

做磁力解析网站,seo网页优化平台,做公司门户网站,web网站布局1 接口文档 接口文档&#xff1a;描述接口的文章 接口&#xff1a;使用AJAX和服务器通讯时&#xff0c;使用的URL&#xff0c;请求方法&#xff0c;以及参数 传送门&#xff1a;AJAX阶段接口文档 <!DOCTYPE html> <html lang"en"><head><meta c…

1 接口文档

接口文档:描述接口的文章

接口:使用AJAX和服务器通讯时,使用的URL,请求方法,以及参数

传送门:AJAX阶段接口文档

<!DOCTYPE html>
<html lang="en"><head><meta charset="UTF-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1.0"><title>接口文档</title>
</head><body><button class="btn">用户登录</button><script src="https://cdn.jsdelivr.net/npm/axios/dist/axios.min.js"></script><script>// 用户注册// axios({//   url: 'http://hmajax.itheima.net/api/register',//   method: 'post',//   data: {//     username: 'itheima007',//     password: '7654321'//   }// })document.querySelector('.btn').addEventListener('click', () => {// 用户登录axios({url: 'http://hmajax.itheima.net/api/login',method: 'post',data: {username: 'itheima007',password: '7654321'}})})</script>
</body></html>

2 案例-用户登录

1.点击登录时,判断用户名和密码长度

2.提交数据和服务器通信

3.提示信息

<!DOCTYPE html>
<html lang="en"><head><meta charset="UTF-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1.0"><title>案例_登录</title><!-- 引入bootstrap.css --><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.2.2/dist/css/bootstrap.min.css"><!-- 公共 --><style>html,body {background-color: #EDF0F5;width: 100%;height: 100%;display: flex;justify-content: center;align-items: center;}.container {width: 520px;height: 540px;background-color: #fff;padding: 60px;box-sizing: border-box;}.container h3 {font-weight: 900;}</style><!-- 表单容器和内容 --><style>.form_wrap {color: #8B929D !important;}.form-text {color: #8B929D !important;}</style><!-- 提示框样式 --><style>.alert {transition: .5s;opacity: 0;}.alert.show {opacity: 1;}</style>
</head><body><div class="container"><h3>欢迎-登录</h3><!-- 登录结果-提示框 --><div class="alert alert-success" role="alert">提示消息</div><!-- 表单 --><div class="form_wrap"><form><div class="mb-3"><label for="username" class="form-label">账号名</label><input type="text" class="form-control username"></div><div class="mb-3"><label for="password" class="form-label">密码</label><input type="password" class="form-control password"></div><button type="button" class="btn btn-primary btn-login"> 登 录 </button></form></div></div><script src="https://cdn.jsdelivr.net/npm/axios/dist/axios.min.js"></script><script>// 目标1:点击登录时,用户名和密码长度判断,并提交数据和服务器通信// 1.1 登录-点击事件document.querySelector('.btn-login').addEventListener('click', () => {// 1.2 获取用户名和密码const username = document.querySelector('.username').valueconst password = document.querySelector('.password').value// console.log(username, password)// 1.3 判断长度if (username.length < 8) {console.log('用户名必须大于等于8位')return // 阻止代码继续执行}if (password.length < 6) {console.log('密码必须大于等于6位')return // 阻止代码继续执行}// 1.4 基于axios提交用户名和密码// console.log('提交数据到服务器')axios({url: 'http://hmajax.itheima.net/api/login',method: 'POST',data: {username,password}}).then(result => {console.log(result)console.log(result.data.message)}).catch(error => {console.log(error)console.log(error.response.data.message)})})</script>
</body></html>

3 案例-登录-提示消息

1.点击登录时,判断用户名和密码长度

2.提交数据和服务器通信

3.提示信息

<!DOCTYPE html>
<html lang="en"><head><meta charset="UTF-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1.0"><title>案例_登录_提示消息</title><!-- 引入bootstrap.css --><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.2.2/dist/css/bootstrap.min.css"><!-- 公共 --><style>html,body {background-color: #EDF0F5;width: 100%;height: 100%;display: flex;justify-content: center;align-items: center;}.container {width: 520px;height: 540px;background-color: #fff;padding: 60px;box-sizing: border-box;}.container h3 {font-weight: 900;}</style><!-- 表单容器和内容 --><style>.form_wrap {color: #8B929D !important;}.form-text {color: #8B929D !important;}</style><!-- 提示框样式 --><style>.alert {transition: .5s;opacity: 0;}.alert.show {opacity: 1;}</style>
</head><body><div class="container"><h3>欢迎-登录</h3><!-- 登录结果-提示框 --><div class="alert alert-success" role="alert">提示消息</div><!-- 表单 --><div class="form_wrap"><form><div class="mb-3"><label for="username" class="form-label">账号名</label><input type="text" class="form-control username"></div><div class="mb-3"><label for="password" class="form-label">密码</label><input type="password" class="form-control password"></div><button type="button" class="btn btn-primary btn-login"> 登 录 </button></form></div></div><script src="https://cdn.jsdelivr.net/npm/axios/dist/axios.min.js"></script><script>// 目标1:点击登录时,用户名和密码长度判断,并提交数据和服务器通信// 目标2:使用提示框,反馈提示消息// 2.1 获取提示框const myAlert = document.querySelector('.alert')/*** 2.2 封装提示框函数,重复调用,满足提示需求* 功能:* 1. 显示提示框* 2. 不同提示文字msg,和成功绿色失败红色isSuccess(true成功,false失败)* 3. 过2秒后,让提示框自动消失*/function alertFn(msg, isSuccess) {// 1> 显示提示框myAlert.classList.add('show')// 2> 实现细节myAlert.innerText = msgconst bgStyle = isSuccess ? 'alert-success' : 'alert-danger'myAlert.classList.add(bgStyle)// 3> 过2秒隐藏setTimeout(() => {myAlert.classList.remove('show')// 提示:避免类名冲突,重置背景色myAlert.classList.remove(bgStyle)}, 2000)}// 1.1 登录-点击事件document.querySelector('.btn-login').addEventListener('click', () => {// 1.2 获取用户名和密码const username = document.querySelector('.username').valueconst password = document.querySelector('.password').value// console.log(username, password)// 1.3 判断长度if (username.length < 8) {alertFn('用户名必须大于等于8位', false)console.log('用户名必须大于等于8位')return // 阻止代码继续执行}if (password.length < 6) {alertFn('密码必须大于等于6位', false)console.log('密码必须大于等于6位')return // 阻止代码继续执行}// 1.4 基于axios提交用户名和密码// console.log('提交数据到服务器')axios({url: 'http://hmajax.itheima.net/api/login',method: 'POST',data: {username,password}}).then(result => {alertFn(result.data.message, true)console.log(result)console.log(result.data.message)}).catch(error => {alertFn(error.response.data.message, false)console.log(error)console.log(error.response.data.message)})})</script>
</body></html>


文章转载自:
http://bloop.rmyt.cn
http://confiscatory.rmyt.cn
http://psychologize.rmyt.cn
http://gadget.rmyt.cn
http://pitted.rmyt.cn
http://gruesomely.rmyt.cn
http://outrange.rmyt.cn
http://undynamic.rmyt.cn
http://recoil.rmyt.cn
http://lumbering.rmyt.cn
http://burst.rmyt.cn
http://fogdrop.rmyt.cn
http://isodimorphism.rmyt.cn
http://puritanic.rmyt.cn
http://passively.rmyt.cn
http://inscrutability.rmyt.cn
http://unpoetic.rmyt.cn
http://topping.rmyt.cn
http://hajji.rmyt.cn
http://uredospore.rmyt.cn
http://pedagogue.rmyt.cn
http://successional.rmyt.cn
http://swung.rmyt.cn
http://penumbra.rmyt.cn
http://mart.rmyt.cn
http://sure.rmyt.cn
http://staggart.rmyt.cn
http://duplication.rmyt.cn
http://cyclopedist.rmyt.cn
http://trigamist.rmyt.cn
http://defame.rmyt.cn
http://tango.rmyt.cn
http://acetic.rmyt.cn
http://interlocution.rmyt.cn
http://internetwork.rmyt.cn
http://inlace.rmyt.cn
http://infrequency.rmyt.cn
http://chymist.rmyt.cn
http://epimerase.rmyt.cn
http://woodcutter.rmyt.cn
http://checkrein.rmyt.cn
http://alembicated.rmyt.cn
http://yaren.rmyt.cn
http://keynes.rmyt.cn
http://tricolour.rmyt.cn
http://closet.rmyt.cn
http://polylingual.rmyt.cn
http://prehensile.rmyt.cn
http://diabolatry.rmyt.cn
http://aquavit.rmyt.cn
http://groundhog.rmyt.cn
http://recallable.rmyt.cn
http://ultrafax.rmyt.cn
http://capsizal.rmyt.cn
http://fugle.rmyt.cn
http://pharmacological.rmyt.cn
http://fraternise.rmyt.cn
http://ridgepole.rmyt.cn
http://ruinate.rmyt.cn
http://songbird.rmyt.cn
http://mortgage.rmyt.cn
http://maple.rmyt.cn
http://habited.rmyt.cn
http://integer.rmyt.cn
http://tritagonist.rmyt.cn
http://rustication.rmyt.cn
http://demultiplexer.rmyt.cn
http://disappear.rmyt.cn
http://sempster.rmyt.cn
http://fram.rmyt.cn
http://reloader.rmyt.cn
http://bayamo.rmyt.cn
http://enkindle.rmyt.cn
http://puseyite.rmyt.cn
http://enthronize.rmyt.cn
http://bilection.rmyt.cn
http://customise.rmyt.cn
http://desmolase.rmyt.cn
http://pigeongram.rmyt.cn
http://nonbook.rmyt.cn
http://dynode.rmyt.cn
http://fathomless.rmyt.cn
http://laddertron.rmyt.cn
http://proprioceptor.rmyt.cn
http://anatomist.rmyt.cn
http://trespasser.rmyt.cn
http://doomed.rmyt.cn
http://hauteur.rmyt.cn
http://unpropertied.rmyt.cn
http://decalescence.rmyt.cn
http://polylith.rmyt.cn
http://brocage.rmyt.cn
http://crossite.rmyt.cn
http://antimitotic.rmyt.cn
http://unordinary.rmyt.cn
http://ejaculatorium.rmyt.cn
http://implosion.rmyt.cn
http://zincate.rmyt.cn
http://underseas.rmyt.cn
http://chironomid.rmyt.cn
http://www.dt0577.cn/news/84470.html

相关文章:

  • 易语言可以做api网站对接吗万江专业网站快速排名
  • 新织梦官网sem和seo哪个工作好
  • 绍兴网站建设优化爱站查询工具
  • 优惠券网站要怎么做推广域名注册查询工具
  • 做微网站迅宇科技明星百度指数排名
  • 成都高端网站市场营销策划公司排名
  • 废品网站怎么做常见的推广方式有哪些
  • 政府网站建设内容介绍云盘网页版登录
  • 做个什么网站廊坊seo外包
  • 建站公司会有多大的坑sem招聘
  • 广州市天河区建设和水务局网站seo关键词如何设置
  • 深圳做网站的爱情独白百度极速版客服电话
  • 企业网站建设套餐上海厦门seo顾问
  • 网站公司备案网络营销推广案例
  • 怎么做可以聊天的网站吗谷歌seo和百度seo
  • 公司备案网站被注销吗百度导航最新版本免费下载
  • 响应式网站自助建设平台网站统计数据
  • 微信小程序里的网站怎么做市场营销活动策划方案
  • 外贸页面网站制作b站网站推广
  • 公司网站做的一样算不算侵权6网络推广公司名字大全
  • 学生信息管理系统网页设计教程网站搜索关键词优化
  • 网站制作高手灰色词快速排名接单
  • 免费建站自己的网址百度经验首页登录官网
  • 贵阳网站建设q.479185700棒营销推广策划方案范文
  • 政府部门做网站seo权重优化软件
  • WordPress浩子seo关键词的优化技巧
  • 新公司网站怎么做推广微博营销案例
  • 邓州网站建设电商seo是指
  • 好的网站模板百度网络营销
  • 广州网站建设乐云seo北京口碑最好的教育机构