会员可以在此提问,百战程序员老师有问必答
对大家有帮助的问答会被标记为“推荐”
看完课程过来浏览一下别人提的问题,会帮你学得更全面
截止目前,同学们一共提了 133642个问题
WEB前端全系列/第一阶段:HTML5+CSS3模块/CSS3新特性 20656楼
JAVA 全系列/第十四阶段:分布式文件存储与数据缓存/Nginx 20658楼

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>06_Ajax的简单封装</title>
</head>
<body>
    <h1>06_Ajax的简单封装</h1>
    <input type="button" value="测试封装" onclick="test1()"/>
    <script>
        function ajax(options){
            var xhr=new XMLHttpRequest()
            xhr.open(options.type,options.url)
            xhr.send()
            xhr.onreadystatechange=function(){
                if(xhr.readyState==4 && xhr.status==200){
                    console.log(xhr.responseText)
                }
            }
        }

        function test1(){
            ajax({
                type:'get',
                url:'/login'
            })
        }
    </script>
    
</body>
</html>
import re
from flask import Flask, request,render_template

app=Flask(__name__)

@app.route('/login',methods=['GET','POST'])
def login():
    if request.method=='GET':
        return 'get请求成功'
    elif request.method=='POST':
        return 'post请求成功'

@app.route('/')
def test():
    return render_template('02_Ajax的参数传递.html')

@app.route('/state',methods=['GET','POST'])
def state():
    if request.method=='GET':
        return render_template('04_Ajax状态码的使用.html')
    elif request.method=='POST':
        return 'post请求成功'

@app.route('/fz01')
def fz01():
    return render_template('06_Ajax的简单封装.html')


if __name__=="__main__":
    app.run()

老师 这两个有啥区别 搞混了  两个都是服务器的地址吗 

@app.route('/fz01')
 url:'/login'

还有老师在视频06:00中说到 返回一个模板是什么意思

Python 全系列/第七阶段:网页编程基础/Ajax 20659楼
Python 全系列/第六阶段:数据库与AI协同技术实战/python操作mysql(旧) 20660楼

parent.rar


org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'demoServiceImpl': Injection of @Reference dependencies is failed; nested exception is java.lang.IllegalStateException: Failed to check the status of the service com.bjsxt.dubbo.service.DemoDubboService. No provider available for the service com.bjsxt.dubbo.service.DemoDubboService from the url zookeeper://192.168.59.128:2181/org.apache.dubbo.registry.RegistryService?application=myConsumer&dubbo=2.0.2&init=false&interface=com.bjsxt.dubbo.service.DemoDubboService&methods=showMsg&pid=13112&register.ip=192.168.59.1&release=2.7.6&revision=1.0-SNAPSHOT&side=consumer&sticky=false&timestamp=1623310222200 to the consumer 192.168.59.1 use dubbo version 2.7.6

image.png

image.png

JAVA 全系列/第十一阶段:分布式RPC调用和分布式文件存储/Dubbo 20662楼
JAVA 全系列/第一阶段:AI驱动的JAVA编程/飞机大战小项目训练 20668楼
JAVA 全系列/第五阶段:网页编程和设计/HTML5(旧) 20669楼

课程分类

百战程序员微信公众号

百战程序员微信小程序

©2014-2025百战汇智(北京)科技有限公司 All Rights Reserved 北京亦庄经济开发区科创十四街 赛蒂国际工业园
网站维护:百战汇智(北京)科技有限公司
京公网安备 11011402011233号    京ICP备18060230号-3    营业执照    经营许可证:京B2-20212637