随笔分类 -  ajax

摘要://首先创建xmlHttpRequest对象 var xmlhttprequest = new XMLHttpRequest(); //创建open设置参数 true是代表异步请求 xmlhttprequest.open("GET","http://localhost:8080/untitled_w 阅读全文
posted @ 2022-09-05 10:32 软工小蜗牛 阅读(89) 评论(0) 推荐(0)
摘要:主要的ajax方法 url 表示请求的地址 type 表示请求的类型GET或者POST date 表示发送给服务器数据 格式有两种 name=value&name=value {key:value} success 表示请求响应,相应的回调函数 dateType 响应的数据类型 常用的数据类型有 t 阅读全文
posted @ 2022-05-20 11:44 软工小蜗牛 阅读(75) 评论(0) 推荐(0)
摘要:1.首先创建ajax对象 要设置一个变量接受ajax对象 var xmlhttprequest = new XMLHTTPRequset(); 2.调用open方法设置请求参数 open(method,url,async) xmlhttprequset.open("get","http://loca 阅读全文
posted @ 2022-05-17 10:46 软工小蜗牛 阅读(77) 评论(0) 推荐(0)