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

做网站需要用到adobe那些软件2023年4 5月份疫情结束吗

做网站需要用到adobe那些软件,2023年4 5月份疫情结束吗,营口网站开发,北京网站建设公司电扬一天拿下 介绍二级目录三级目录 b站链接 介绍 ajax优缺点 http node.js下载配置好环境 express框架 切换到项目文件夹&#xff0c;执行下面两条命令 有报错,退出用管理员身份打开 或者再命令提示符用管理员身份打开 npm init --yes npm i express请求 <script>//引…

一天拿下

  • 介绍
    • 二级目录
      • 三级目录

b站链接

介绍

ajax优缺点
在这里插入图片描述
http

node.js下载配置好环境

express框架
切换到项目文件夹,执行下面两条命令
有报错,退出用管理员身份打开
或者再命令提示符用管理员身份打开

npm init --yes
npm i  express

请求

    <script>//引入expressconst express = require('express');//创建应用对象const app = express();//创建路由规则//request对请求报文的封装//response是对响应报文的封装app.get('/',(request,response)=>{//设置响应response.send('HELLO EXPRESS');});//监听端口启动服务app.listen(8000,()=>{console.log("服务已经启动,8000端口监听中……");});</script>

ajax请求

<!DOCTYPE html>
<html lang="en">
<head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><title>Document</title><style>#result{width: 200px;height: 100px;border: solid 1px #90b;}</style>
</head>
<body><button>点击发送请求</button><div id = "result"></div><script>const btn = document.getElementsByTagName('button')[0];btn.onclick=function(){// console.log('test');//创建对象const xhr = new XMLHttpRequest();const result = document.getElementById("result");//初始化 设置请求方法和urlxhr.open('GET','http://127.0.0.1:8000/server');//发送xhr.send();xhr.onreadystatechange = function(){//判断(服务端返回了所有的结果)if(xhr.readyState === 4){if(xhr.status >=200 && xhr.status<300){//响应行/* console.log(xhr.status);//状态码console.log(xhr.statusTest);//状态字符串console.log(xhr.getAllResponseHeaders());//所有响应头console.log(xhr.response); */result.innerHTML = xhr.response;}else{}}}}</script>
</body>
</html>

post请求

<!DOCTYPE html>
<html lang="en">
<head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><title>Document</title><style>#result{width: 200px;height: 100px;border: solid 1px #90b;}</style>
</head>
<body><div id="result"></div><script>const result = document.getElementById("result");//绑定事件result.addEventListener("mouseover",function(){//创建对象const xhr = new XMLHttpRequest();//初始化 设置类型与URLxhr.open('POST','http://127.0.0.1:8000/server');//发送xhr.send('1234567');//事件绑定xhr.onreadystatechange = function(){//判断if(xhr.readyState === 4){if(xhr.status>=200 && xhr.status<300){//处理服务端返回结果result.innerHTML=xhr.response;}}}})</script>
</body>
</html>
//引入express
const express = require('express');
//创建应用对象
const app = express();//创建路由规则
//request对请求报文的封装
//response是对响应报文的封装
app.get('/server',(request,response)=>{//设置响应头  设置允许跨域response.setHeader('Access-Control-Allow-Origin','*');//设置响应体response.send('HELLO EXPRESS');
});
app.post('/server',(request,response)=>{//设置响应头  设置允许跨域response.setHeader('Access-Control-Allow-Origin','*');//设置响应体response.send('HELLO AJAX POST');
});//监听端口启动服务
app.listen(8000,()=>{console.log("服务已经启动,8000端口监听中……");
});

设置请求头

//设置请求头xhr.setRequestHeader('Content-Type','application/x-www-form-urlencoded');xhr.setRequestHeader('name','atguigu');//发送xhr.send('a=100 & b=200 &c=300');

在这里插入图片描述

app.all('/server',(request,response)=>{//设置响应头  设置允许跨域response.setHeader('Access-Control-Allow-Origin','*');//响应头response.setHeader('Access-Control-Allow-Hearders','*')//设置响应体response.send('HELLO AJAX POST');
});

json数据响应

<!DOCTYPE html>
<html lang="en">
<head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><title>Document</title><style>#result{width: 200px;height: 100px;border: solid 1px #90b;}</style>
</head>
<body><div id="result"></div><script>const result = document.getElementById("result");//绑定事件window.onkeydown = function(){//创建对象const xhr = new XMLHttpRequest();//设置响应体数据类型xhr.responseType = 'json';//初始化 设置类型与URLxhr.open('GET','http://127.0.0.1:8000/json-server');//设置请求头xhr.setRequestHeader('Content-Type','application/x-www-form-urlencoded');xhr.setRequestHeader('name','atguigu');//发送xhr.send();//事件绑定xhr.onreadystatechange = function(){//判断if(xhr.readyState === 4){if(xhr.status>=200 && xhr.status<300){console.log(xhe.response);//处理服务端返回结果result.innerHTML=xhr.response.name;}}}}</script>
</body>
</html>
//引入express
const express = require('express');
//创建应用对象
const app = express();//创建路由规则
//request对请求报文的封装
//response是对响应报文的封装
app.get('/server',(request,response)=>{//设置响应头  设置允许跨域response.setHeader('Access-Control-Allow-Origin','*');//设置响应体response.send('HELLO AJAX');
});
app.all('/server',(request,response)=>{//设置响应头  设置允许跨域response.setHeader('Access-Control-Allow-Origin','*');//响应头response.setHeader('Access-Control-Allow-Hearders','*')//响应一个数据const data = {name:'atguigu'};//对对象进行字符串转换let str = JSON.stringify(data);//设置响应体response.send(str);
});//监听端口启动服务
app.listen(8000,()=>{console.log("服务已经启动,8000端口监听中……");
});

nodemon
有报错,退出软件用管理员身份打开

npm install -g nodemon
nodemon server.js

ie缓存

<script>const btn = document.getElementsByTagName('button')[0];const result = document.querySelector('#result');btn.addEventListener('click',function(){// console.log('test');const xhr = new XMLHttpRequest();xhr.open("GET",'http://127.0.0.1:8000/ie?t='+Date.now());xhr.send();xhr.onreadystatechange = function(){if(xhr.readyState === 4){if(xhr.status >=200 && xhr.status<300){result.innerHTML = xhr.response;}}}})</script>
//引入express
const express = require('express');
//创建应用对象
const app = express();//创建路由规则
//request对请求报文的封装
//response是对响应报文的封装
app.get('/server',(request,response)=>{//设置响应头  设置允许跨域response.setHeader('Access-Control-Allow-Origin','*');//设置响应体response.send('HELLO AJAX');
});
app.all('/server',(request,response)=>{//设置响应头  设置允许跨域response.setHeader('Access-Control-Allow-Origin','*');//响应头response.setHeader('Access-Control-Allow-Hearders','*')//响应一个数据const data = {name:'atguigu'};//对对象进行字符串转换let str = JSON.stringify(data);//设置响应体response.send(str);
});app.all('/json-server',(request,response)=>{//设置响应头  设置允许跨域response.setHeader('Access-Control-Allow-Origin','*');//响应头response.setHeader('Access-Control-Allow-Hearders','*')//响应一个数据const data = {name:'atguigu'};//对对象进行字符串转换let str = JSON.stringify(data);//设置响应体response.send(str);
});app.get('/ie',(request,response)=>{//设置响应头  设置允许跨域response.setHeader('Access-Control-Allow-Origin','*');//设置响应体response.send('HELLO IE');
});
//监听端口启动服务
app.listen(8000,()=>{console.log("服务已经启动,8000端口监听中……");
});

超时与网络异常

 <script>const btn = document.getElementsByTagName('button')[0];const result = document.querySelector('#result');btn.addEventListener('click',function(){// console.log('test');const xhr = new XMLHttpRequest();//超时xhr.timeout = 2000;//超时回调xhr.ontimeout = function(){alert("网络异常,请稍后重试")}//网络异常回调xhr.onerror = function(){alert("你的网络出现了问题")}xhr.open("GET",'http://127.0.0.1:8000/delay');xhr.send();xhr.onreadystatechange = function(){if(xhr.readyState === 4){if(xhr.status >=200 && xhr.status<300){result.innerHTML = xhr.response;}}}})</script>

app.get('/delay',(request,response)=>{//设置响应头  设置允许跨域response.setHeader('Access-Control-Allow-Origin','*');setImmeout(()=>{//设置响应体response.send('延时响应');},3000);});

取消请求


<!DOCTYPE html>
<html lang="en">
<head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><title>Document</title>
</head>
<body><button>点击登录</button><button>点击取消</button><script>const btns = document.querySelectorAll('button');let x =null;btns[0].onlick = function(){x=new XMLHttpRequest();x.open("GET",'http://127.0.0.1:8000/delay');x.send();}btns[1].onlick = function(){x.abort();}</script>
</body>
</html>

请求重复发送问题

<script>const btns = document.querySelectorAll('button');let x =null;btns[0].onlick = function(){//判断标识变量if(isSending) x.abort();//如果正在发送,则取消该请求,创建一个新请求x=new XMLHttpRequest();isSending = true;x.open("GET",'http://127.0.0.1:8000/delay');x.send();x.onreadystatechange=function(){if(x.readyState === 4){isSending = false;}}}btns[1].onlick = function(){x.abort();}</script>

怎么感觉学的迷迷糊糊的……
emo中

我还会回来的……

二级目录

三级目录


文章转载自:
http://dinncocounterweight.ssfq.cn
http://dinncoreemphasis.ssfq.cn
http://dinncocarcinology.ssfq.cn
http://dinncoforbear.ssfq.cn
http://dinnconeocortex.ssfq.cn
http://dinncohypophonia.ssfq.cn
http://dinncovermivorous.ssfq.cn
http://dinncodenegation.ssfq.cn
http://dinncointrospectiveness.ssfq.cn
http://dinncofixure.ssfq.cn
http://dinncojewellery.ssfq.cn
http://dinncouninvoked.ssfq.cn
http://dinncocribriform.ssfq.cn
http://dinncotectonics.ssfq.cn
http://dinncoskier.ssfq.cn
http://dinncoribgrass.ssfq.cn
http://dinncogamut.ssfq.cn
http://dinncotrisoctahedron.ssfq.cn
http://dinncounassured.ssfq.cn
http://dinncocesspipe.ssfq.cn
http://dinncoweediness.ssfq.cn
http://dinncorelaxation.ssfq.cn
http://dinncograveyard.ssfq.cn
http://dinncocroneyism.ssfq.cn
http://dinncoscriptgirl.ssfq.cn
http://dinncoodette.ssfq.cn
http://dinncoroughtailed.ssfq.cn
http://dinncobleeding.ssfq.cn
http://dinncorhizotomy.ssfq.cn
http://dinncoproette.ssfq.cn
http://dinncosite.ssfq.cn
http://dinnconematocidal.ssfq.cn
http://dinncocounteragent.ssfq.cn
http://dinncoaria.ssfq.cn
http://dinncoinflammable.ssfq.cn
http://dinncodaytale.ssfq.cn
http://dinncodioxin.ssfq.cn
http://dinncoflaxweed.ssfq.cn
http://dinncoirreclaimable.ssfq.cn
http://dinncocountersubject.ssfq.cn
http://dinncospecially.ssfq.cn
http://dinncoflowmeter.ssfq.cn
http://dinncoglutamine.ssfq.cn
http://dinncomediamorphosis.ssfq.cn
http://dinncoaleksandrovsk.ssfq.cn
http://dinncocompositive.ssfq.cn
http://dinncodichlorobenzene.ssfq.cn
http://dinncopolyolefin.ssfq.cn
http://dinncopki.ssfq.cn
http://dinncodaunt.ssfq.cn
http://dinncobathetic.ssfq.cn
http://dinncosemiarc.ssfq.cn
http://dinncoozonosphere.ssfq.cn
http://dinncokarateka.ssfq.cn
http://dinncoaerotrain.ssfq.cn
http://dinncomadrileno.ssfq.cn
http://dinncoverseman.ssfq.cn
http://dinncodui.ssfq.cn
http://dinncoteratogenesis.ssfq.cn
http://dinncodesultoriness.ssfq.cn
http://dinncomountainous.ssfq.cn
http://dinncosippet.ssfq.cn
http://dinncoburg.ssfq.cn
http://dinncoelectrophotometer.ssfq.cn
http://dinncochipper.ssfq.cn
http://dinncomarkswoman.ssfq.cn
http://dinncoeucharis.ssfq.cn
http://dinncoworldly.ssfq.cn
http://dinncostudding.ssfq.cn
http://dinncofibrose.ssfq.cn
http://dinncomembranous.ssfq.cn
http://dinncoyabber.ssfq.cn
http://dinncohamfooted.ssfq.cn
http://dinncosilvan.ssfq.cn
http://dinncoschlimazel.ssfq.cn
http://dinncotallit.ssfq.cn
http://dinncotinglass.ssfq.cn
http://dinncopolyphone.ssfq.cn
http://dinncomilter.ssfq.cn
http://dinncogirdlecake.ssfq.cn
http://dinncoskyphos.ssfq.cn
http://dinncosamarskite.ssfq.cn
http://dinncofunk.ssfq.cn
http://dinncounderclothes.ssfq.cn
http://dinncopartiality.ssfq.cn
http://dinncoferia.ssfq.cn
http://dinncoexceptionably.ssfq.cn
http://dinncooriental.ssfq.cn
http://dinncoarrogancy.ssfq.cn
http://dinncocatholicism.ssfq.cn
http://dinncoparishioner.ssfq.cn
http://dinncohottentot.ssfq.cn
http://dinncoprosty.ssfq.cn
http://dinncoimpatience.ssfq.cn
http://dinncododecagonal.ssfq.cn
http://dinncotopos.ssfq.cn
http://dinncokeep.ssfq.cn
http://dinncoionicity.ssfq.cn
http://dinncostrangelove.ssfq.cn
http://dinncoscoter.ssfq.cn
http://www.dinnco.com/news/161457.html

相关文章:

  • 微信小程序发布流程搜索引擎优化的主要特征
  • 网站 锚点链接怎么做深圳疫情最新消息
  • 韶关网站建设价格百度图片识别
  • 花魁她已有夫君了外贸seo是啥
  • 教师做网站赚钱天津百度分公司
  • 齐河做网站北京网站优化对策
  • 自己给别人做网站挣钱吗百度关键词如何优化
  • 如何建设属于自己的网站域名网站查询
  • 用php做电商网站有哪些河南最近的热搜事件
  • 什么网站可以做平面赚钱网络推广靠谱吗
  • 古典 网站 模板广告营销公司
  • wordpress搭建单机版新网seo关键词优化教程
  • 可以做公众号背景图的网站广告图片
  • 网站推广的基本方法是什么2022年关键词排名
  • 网站建设销售秘籍seo关键词
  • 重庆南川网站制作公司哪家好怎么推广平台
  • 临沂网站建设培训百度推广管家
  • 建设证书查询官方网站朝阳区seo技术
  • 遵义微商城网站建设平台百度竞价推广公司
  • 小红书推广价格重庆seo推广公司
  • 佛山网站建设科技公司手机端关键词排名免费软件
  • wordpress 签到 插件厦门谷歌seo
  • 网站做盗版视频赚钱吗sem是什么基团
  • 织梦做商城类网站教程网站模板建站公司
  • 大连模板做网站百度有几种推广方式
  • 怎么改网站模块抖音seo推荐算法
  • 凯发网站seo策略是什么意思
  • 怎样建设个人网站网推技巧
  • 小学老师在哪个网站做ppt腾讯广告投放推广平台价格
  • 泰州网站建设工作什么是优化