1.我建立了2个jsp页面index.jsp页面中:重要是用来将页面按照2:8分为左右2部分<%@pagelanguage="java"contentType="text/html;charset=ISO-8859-1"pageEncoding="ISO-8859-1"%><!DOCTYPEhtmlPUBLIC"-//W3C//DTDHTML4.01Transitional//EN""http://www.w3.org/TR/html4/..
分类:
Web程序 时间:
2015-02-14 01:23:39
阅读次数:
164
jquery Ajax 不执行回调函数success的原因:$.ajax({ type: "post", contentType: "application/json", url: ba...
分类:
Web程序 时间:
2015-02-12 20:08:38
阅读次数:
168
HttpResponse输出文件: Response.Clear(); Response.ContentType = "application/octet-stream"; //通知浏览器下载文件而不是打开 ...
分类:
Web程序 时间:
2015-02-12 00:32:41
阅读次数:
1183
如果要获得上传文件的原始名称,需要定义一个String类型的属性,属性名必须为***FileName,其中***为File属性的名称;同理,如果要获取该文件的MIME类型,需要定义一个***ContentType的String属性
单个文件上传
public class UploadAction extends ActionSupport{
private File image...
分类:
Web程序 时间:
2015-02-09 09:25:10
阅读次数:
171
在这里,我们先说说JSP/Servlet中的几个编码的作用。 在JSP/Servlet 中主要有以下几个地方可以设置编码,pageEncoding="UTF-8"、contentType="text/html;charset=UTF-8request.setCharacterEncoding("U....
分类:
Web程序 时间:
2015-02-02 12:05:27
阅读次数:
110
写js时总是会遇到跨域请求的问题,现在了解了两种方法,记录之:
1)使用$.ajax,但是返回数据类型要设置为jsonp,示例:
$.ajax({
type: 'get',
contentType: "application/json; charset=utf-8",
url: "http://localhost:8080/...
分类:
Web程序 时间:
2015-02-02 10:54:48
阅读次数:
155
meta标签content属性必须和http-equiv或者name属性一起使用http-equiv属性,就是http当量,用于和服务器发送数据前的提交交互使用。(另层含义这个当量在浏览器和服务器同价值,就是当量,采用的http协议)服务器代码response.ContentType=“text/h...
分类:
Web程序 时间:
2015-02-01 01:49:34
阅读次数:
306
public class cl_file_upload : IHttpHandler{ public void ProcessRequest(HttpContext context) { context.Response.ContentType = "text/plain"...
分类:
Web程序 时间:
2015-01-28 17:42:05
阅读次数:
160
ashx文件返回json数据: public void ProcessRequest(HttpContext context) { context.Response.ContentType = "text/plain"; str...
分类:
Web程序 时间:
2015-01-28 14:20:25
阅读次数:
254
ds为数据源Response.Buffer = true; Response.AppendHeader("Content-Disposition", "attachment;filename=" + FileName);//文件名Response.ContentType = "application...
分类:
Web程序 时间:
2015-01-23 18:03:47
阅读次数:
146