jQuery没有正确序列化

时间:2017-02-02 00:55:34

标签: javascript php jquery ajax

我想要ajax submit 2表单(socks.setdefaultproxy(socks.PROXY_TYPE_SOCKS5 , "127.0.0.1", 9150, True) socket.socket = socks.socksocket socks.wrapmodule(requests) url = "myexample.com" # r = requests.Session() s = requests.get(url) print s Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 127, in urlopen return _opener.open(url, data, timeout) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 404, in open response = self._open(req, data) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 422, in _open '_open', req) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 382, in _call_chain result = func(*args) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 1222, in https_open return self.do_open(httplib.HTTPSConnection, req) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 1181, in do_open h.request(req.get_method(), req.get_selector(), req.data, headers) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py", line 973, in request self._send_request(method, url, body, headers) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py", line 1007, in _send_request self.endheaders(body) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py", line 969, in endheaders self._send_output(message_body) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py", line 829, in _send_output self.send(msg) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py", line 791, in send self.connect() File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py", line 1172, in connect self.timeout, self.source_address) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/socket.py", line 562, in create_connection sock.connect(sa) File "/Library/Python/2.7/site-packages/socks.py", line 747, in connect negotiate(self, dest_addr, dest_port) File "/Library/Python/2.7/site-packages/socks.py", line 419, in _negotiate_SOCKS5 CONNECT, dest_addr) File "/Library/Python/2.7/site-packages/socks.py", line 494, in _SOCKS5_request raise SOCKS5Error("{0:#04x}: {1}".format(status, error)) socks.SOCKS5Error: 0x01: General SOCKS server failure User)。 2个表单几乎相同,但Client按预期序列化,另一个不是。 2个表单User js分别作为returnonsubmit="return editUser();"。我尝试提醒序列化数据,并显示给用户:

onsubmit="return editClient();"

和客户:

id=7&username=somethingelse&password=123&is_admin=0&client=1

填写所有字段(3个值预填充PHP代码)。

这是我执行ajax的js代码:

id=2&name=&logo=&phone=&email=&active=1&street=&city=&state=43&zip_code= 

评论你的问题,我知道我解释的东西很糟糕。谢谢你的帮助。

总结一下这个问题:为什么用户和客户端功能几乎完全相同(ID和表单中的某些字段不同)但是用户工作得很好而客户端没有?

如需更多信息,请use this查看结果。登录信息是:admin pass。 登录后,单击左侧边栏中的“用户”选项卡并尝试更新客户端,您将看到它无法正常工作但您仍然可以编辑用户

0 个答案:

没有答案