2012年3月15日

在服务器端判断request来自Ajax请求(异步)还是传统请求(同步)

摘要: 转自: http://holdbelief.javaeye.com/blog/528114在服务器端判断request来自Ajax请求(异步)还是传统请求(同步): 两种请求在请求的Header不同,Ajax 异步请求比传统的同步请求多了一个头参数 1、传统同步请求参数 accept t... 阅读全文

posted @ 2012-03-15 17:53 dhj 阅读(211) 评论(0) 推荐(0)

JSP获取header信息request列表

摘要: "); out.println("Scheme: " + request.getScheme() + ""); out.println("Server Name: " + request.getServerName() + "" ); out.println("Server Port: " + r... 阅读全文

posted @ 2012-03-15 17:45 dhj 阅读(711) 评论(0) 推荐(0)

通过 Object.prototype.toString.call() 进行类型判断

摘要: 首先看一段ECMA中对Object.prototype.toString的解释: Object.prototype.toString( ) When the toString method is called, the following steps are taken: 1. Get the [... 阅读全文

posted @ 2012-03-15 11:21 dhj 阅读(155) 评论(0) 推荐(0)

如何让jsp和js获取来源页地址和ip原理及代码

摘要: 转自:http://blog.sina.com.cn/s/blog_773505170100snrd.html我们写代码时经常会想记录访问页的来源页地址和用户的访问IP,就会用到以下的内容。js获取来源页地址方法:var url = document.referrer;document.write... 阅读全文

posted @ 2012-03-15 11:01 dhj 阅读(612) 评论(0) 推荐(0)

导航