上面是index.jsp页面,如果要使用标签那么就要导入jstl的包,然后采用绝对路径来访问其他的界面。 下面是ajaxXml.jsp页面 //发给前端 response.setContentType("text/xml;charset=utf-8");//★★★ response.getWrite ...
分类:
Web程序 时间:
2017-03-06 17:48:08
阅读次数:
233
1、get形式访问: 一个相同的URL 只有一个结果,所以 第二次访问的时候 如果 URL字符串没变化 浏览器是 直接拿出了第一次访问的结果,post则不会 解决办法: 1、url+new Date(); (每次访问时url不同) 2、 type : 'get', //提交方式 cache:fals ...
分类:
Web程序 时间:
2017-03-06 17:39:44
阅读次数:
196
说明: 1. 导入三个模块,urllib.request.urlopen用来打开url链接,urllib.parse的urlencode方法将浏览器network里的data对象转为urlopen的第二个参数data,json.loads()方法把response.read返回的字符串转为json格 ...
分类:
编程语言 时间:
2017-03-05 12:38:05
阅读次数:
187
转: http://www.yiichina.com/topic/4509 ...
分类:
其他好文 时间:
2017-02-25 11:59:21
阅读次数:
134
urllib.urlencode() 无法encode中文, UnicodeEncodeError, 具体错误内容如下:File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib.py", l ...
分类:
Web程序 时间:
2017-02-24 15:43:10
阅读次数:
239
importurllib
data=urllib.parse.urlencode(params).encode(‘utf-8‘)
req=urllib.request.Request(url,data)
req.add_header(‘Content-Type‘,"application/x-www-form-urlencoded")
response=urllib.request.urlopen(req)
the_page=response.read().decode(‘utf-8‘)
print(the_..
分类:
编程语言 时间:
2017-02-23 23:03:48
阅读次数:
242
请求的结构 HTTP 的交互以请求和响应的应答模式。Go 的请求我们早就见过了,handler 函数的第二个参数 http.Requests。其结构为: 从 request 结构可以看到,http 请求的基本信息都囊括了。对于请求而言,主要关注一下请求的 URL,Method,Header,Body ...
分类:
Web程序 时间:
2017-02-16 23:45:03
阅读次数:
413
最近在使用BootStrap 做项目前端,自然也用到了 Bootstrap Table。 推荐大家多去这个http://bootstrap-table.wenzhixin.net.cn/zh-cn/ 网站看看,上面有很详细的介绍以及其他扩展功能 下面写下 Fixed Columns(固定列)的使用方 ...
分类:
其他好文 时间:
2017-02-09 00:21:29
阅读次数:
372
http://www.aikaiyuan.com/6324.html 用postman时候,选错了就出不来结果。用postman选择 application/x-www-form-urlencoded ...
分类:
其他好文 时间:
2017-02-08 13:16:25
阅读次数:
161
一、最简单的使用 import urllib,urllib2 response = urllib2.urlopen("https://www.baidu.com") print response.read() 二、构造Request对象 request = urllib2.Request("http ...
分类:
Web程序 时间:
2017-02-06 14:37:13
阅读次数:
221