bmcjxhgwy 最近的时间轴更新
bmcjxhgwy

bmcjxhgwy

V2EX 第 256322 号会员,加入于 2017-09-25 18:28:04 +08:00
请教一下 mysql 中如何定义一个为列表的常量啊?
Python  •  bmcjxhgwy  •  2019-11-11 16:36:14 PM  •  最后回复来自 bmcjxhgwy
3
请教一下 mysql 中能否定义一个为列表的常量啊?
MySQL  •  bmcjxhgwy  •  2019-11-13 09:40:17 AM  •  最后回复来自 gigantic222
2
Python open 函数
Python  •  bmcjxhgwy  •  2018-04-02 14:23:31 PM  •  最后回复来自 frostming
8
请教个 Python 读写文件问题
Python  •  bmcjxhgwy  •  2018-03-29 22:44:54 PM  •  最后回复来自 qyzxgl
1
请教下 fidder 问题
Python  •  bmcjxhgwy  •  2018-03-23 20:57:12 PM  •  最后回复来自 evagreenworking
14
请教下 pycharm 的问题
问与答  •  bmcjxhgwy  •  2018-03-13 16:54:36 PM
问个 ajax 的问题,谢谢帮助
Python  •  bmcjxhgwy  •  2018-03-04 15:28:26 PM  •  最后回复来自 zhwithsweet
28
为什么用密码 ssh 连不进自己的 ubuntu 虚拟机里啊?
Python  •  bmcjxhgwy  •  2017-10-23 15:42:39 PM  •  最后回复来自 teemoer
5
服务器 xshell4 连接和下载问题,望各位大佬解答下问题
问与答  •  bmcjxhgwy  •  2017-10-19 06:02:38 AM  •  最后回复来自 msg7086
2
bmcjxhgwy 最近回复了
2019-11-11 16:36:14 +08:00
回复了 bmcjxhgwy 创建的主题 Python 请教一下 mysql 中如何定义一个为列表的常量啊?
非常感谢,已解决
2018-03-30 16:26:10 +08:00
回复了 bmcjxhgwy 创建的主题 Python Python open 函数
@layorlayor 以前好像是 python3 版本 这次是 python2 版本
2018-03-30 16:18:05 +08:00
回复了 bmcjxhgwy 创建的主题 Python Python open 函数
@ballshapesdsd 不是编码,而是格式问题...直接显示 unexpected arguments ( s )了..我记得以前这么写是可以的
2018-03-23 14:56:01 +08:00
回复了 bmcjxhgwy 创建的主题 Python 请教下 fidder 问题
那有没有什么解决方法啊?
2018-03-03 22:42:02 +08:00
回复了 bmcjxhgwy 创建的主题 Python 问个 ajax 的问题,谢谢帮助
@sublime 改了后现在服务器端报 500 错误...

def test(request):
if request.method == "GET":
name = request.GET.get("name")
print(name)
return HttpResponse("func({'res':0})")
else:
name = request.POST.get("name")
print(name)
return HttpResponse("func({'res':1})")


$.ajax({
url:'http://127.0.0.1:8000/laoguo/',
type:'get',
data:{'name':'laoguo'},
dataType:'jsonp',
success:function func(data){
if(data.res == 0){
alert('get')
}else{
alert('error')
}
},
error:function func(data){
alert(data.res)
}
})
2018-03-03 22:16:09 +08:00
回复了 bmcjxhgwy 创建的主题 Python 问个 ajax 的问题,谢谢帮助
2018-03-03 21:45:29 +08:00
回复了 bmcjxhgwy 创建的主题 Python 问个 ajax 的问题,谢谢帮助
@sublime fn_cb 是什么....我也觉得是数据格式不对
2018-03-03 21:33:16 +08:00
回复了 bmcjxhgwy 创建的主题 Python 问个 ajax 的问题,谢谢帮助
这是 ajax:
$(function(){
$('#send-btn').click(function(){
$.ajax({
url:'http://127.0.0.1:8000/laoguo/',
type:'get',
data:{'name':'laoguo'},
dataType:'jsonp',
success:function(data){
if(data.res == 0){
alert('get')
}else{
alert('....')
}
},
error:function(data){
alert(data.res)
}
})
})
})

这是 django 的 view:
def test(request):
if request.method == "GET":
name = request.GET.get("name")
print(name)
return JsonResponse({"res":0})
else:
name = request.POST.getlist("name")
print(name)
return JsonResponse({"res":1})
2018-03-03 20:36:39 +08:00
回复了 bmcjxhgwy 创建的主题 Python 问个 ajax 的问题,谢谢帮助
序列化了好像也没什么用.....
2018-03-03 20:29:56 +08:00
回复了 bmcjxhgwy 创建的主题 Python 问个 ajax 的问题,谢谢帮助
我用了 jsonp 应该不会有跨域的请求..
关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   1026 人在线   最高记录 6543   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 19ms · UTC 22:31 · PVG 06:31 · LAX 15:31 · JFK 18:31
Developed with CodeLauncher
♥ Do have faith in what you're doing.