首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > 编程 >

<htmk:link>的运用

2012-10-06 
htmk:link的使用html:link action/RegUserUI注册(很好)/html:linkbr%request.setAttribute(n

<htmk:link>的使用
<html:link action="/RegUserUI">注册(很好)</html:link><br>

<%
   request.setAttribute("name", "kakashi");
%>
<html:link action="/RegUserUI" paramId="username" paramName="name">注册(url编码)</html:link><br>--->  ....?username="kakashi"(url编码)

<%
    Date now = new Date();
    request.setAttribute("now", now);
%>
<!-- paramId表示参数名,从paramName中取属性paramProperty-->
<html:link action="/RegUserUI" paramId="t" paramName="now" paramProperty="time">注册(对象属性url编码)</html:link><br>

<%
  Map<String,String> map = new HashMap<String,String>();
    map.put("x","1");
    map.put("y","2");
    map.put("z","3");
    request.setAttribute("person", map);
%>
<!-- 传递多个参数 -->
<html:link action="/RegUserUI" name="person">注册(多个参数)</html:link><br>

热点排行