摘要: 使用jsonp来处理跨域 <!DOCTYPE HTML> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <title>Demo</title> <style> body, input 阅读全文
posted @ 2019-11-20 14:07 旧崖 阅读(907) 评论(0) 推荐(0)
摘要: 使用jQuery脚本来简化请求 <!DOCTYPE HTML> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <title>Demo</title> <style> body, in 阅读全文
posted @ 2019-11-20 14:04 旧崖 阅读(171) 评论(0) 推荐(0)
摘要: 以json格式传输数据 <!DOCTYPE HTML> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <title>Demo</title> <style> body, input, 阅读全文
posted @ 2019-11-20 14:02 旧崖 阅读(2507) 评论(0) 推荐(0)
摘要: 基础请求以xml格式传输数据 <!DOCTYPE HTML> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <title>Demo</title> <style> body, inp 阅读全文
posted @ 2019-11-20 14:00 旧崖 阅读(495) 评论(0) 推荐(0)
摘要: 第一种写法 //引入NODE核心模块 var http = require('http'); var data = require('./data.json'); //创建一个服务器对象 var server = http.createServer(); // 启动http服务并设置端口 serve 阅读全文
posted @ 2019-11-20 10:05 旧崖 阅读(401) 评论(0) 推荐(0)