摘自http://blog.csdn.net/woshixuye/article/details/8027089getParameter① 得到的都是String类型的。如http://name.jsp?name=xy中的xy② 获取POST/GET传递的参数值③ 用于客户端重定向,如点击链接或提交...
分类:
其他好文 时间:
2015-05-09 18:48:59
阅读次数:
121
(1)pageContext对象这个对象代表页面上下文,该对象主要用于访问JSP之间的共享数据。pageContext是PageContext类的实例,使用pageContext可以访问page、request、session、application范围的变量。getAttribute(String...
分类:
其他好文 时间:
2015-05-05 19:18:53
阅读次数:
90
前端开发中为达到某种目的,往往有很多方法:dom core,html dom,jquery; dom core/jquery主要通过函数调用的方式(getAttribute("属性名")/attr("属性名"))获取属性值,html dom一般利用属性的形式(element.属性名)获取对应属性值,...
分类:
Web程序 时间:
2015-05-05 18:20:25
阅读次数:
277
setAttribute(String name,Object):设置名字为 name 的 request 的参数值
getAttribute(String name):返回由 name 指定的属性值
getAttributeNames():返回 request 对象所有属性的名字集合,结果是一个枚举的实例
getCookies():返回客户端的所有 Cookie 对象,结果是一个 Cooki...
分类:
其他好文 时间:
2015-05-04 18:03:24
阅读次数:
170
getParameter得到的都是String类型的。或者是用于读取提交的表单中的值(http://a.jsp?id=123中的123),或者是某个表单提交过去的数据; getAttribute则可以是对象Object,需进行转换,可用setAttribute设置成任意对象,使用很灵活,可随时用; ...
分类:
其他好文 时间:
2015-05-04 17:11:53
阅读次数:
102
今天有朋友问这个问题,在这里总结下:
1.getAttribute是取得jsp中 用setAttribute設定的attribute
2.parameter得到的是string;attribute得到的是object
3.request.getParameter()方法传递的数据,会从Web客户端传到Web服务器端,代表HTTP请求数据;request.setAttribute()...
分类:
其他好文 时间:
2015-04-29 11:37:31
阅读次数:
128
dom 是一个 input type="text"使用: dom.setAttribute("value","2011"),只能通过 dom.getAttribute("value") 得到 2011使用: dom.value = 2012,只能通过 dom.value 得到 2012也就是说: g...
分类:
其他好文 时间:
2015-04-27 12:36:03
阅读次数:
184
一个简单的网站计数器方法:
----------------------------------------------------------------
<body>
<%Integercount=(Integer)application.getAttribute("count");
if(count==null){
count=1;
}else{
count++;
}
application.setAttribute("count",count);
%>..
分类:
Web程序 时间:
2015-04-27 00:40:31
阅读次数:
158
Assert.assertTrue(tmpEl.getAttribute("class").contains("selected"),"The folder should be highlighted.");Assert.assertFalse(dialog.isDisplayed(),button...
分类:
其他好文 时间:
2015-04-23 15:33:39
阅读次数:
125
getAttribute() 获取自定义属性 它只有一个参数——你打算查询的属性的名字 不能通过document对象调用,我们只能通过一个元素节点对象调用它setAttribute() 设置自定义属性 它允许我们对属性节点的值做出修改 只能通过元素节点对象调用的函数obiect.setAttri.....
分类:
其他好文 时间:
2015-04-22 13:06:32
阅读次数:
80