易截截图软件、单文件、免安装、纯绿色、仅160KB

jsp/get/set/struts.xml存取

get
jsp         url          ${param.serialID}
action    jsp          String commentId = ServletActionContext.getRequest().getParameter("commentId");
---------------------------------------
action    ServletActionContext.getRequest().setAttribute("searchContent", searchContent);
jsp         action      <s:property value="searchContent"></s:property>
---------------------------------------
function hanshu(num)
{
    window.location.href="<%=request.getContextPath()%>/a.action?num="+num;
}
<a href="javascript:hanshu('${param.url参数名}')"></a>
=====================
post
//使用trim()
String.prototype.trim=function()
{
   return this.replace(/(^\s*)|(\s*$)/g, "");
}
function hanshu()
{
     var selectValue = document.getElementById("selectId").value;
     var textValue = document.getElementById("textId").value;
     //必填
    if(!selectValue)
     {
       alert("必填");
      }
     else if(selectValue.trim().length<1)
     {
         alert("长度");
      }
}
<form action="${pageContext.request.contextPath}/getAction.action" method="post" name="nameForm">
      <select name="seledtName" id="selectId">
               <option value="1">博客</option>
      </select>
      <input type="text" name="textName" id="textId"&g


相关文档:

在多个jsp页面传递参数

1.       怎么在多个JSP页面之间进行参数传递?需要使用JSP的内置作用域对象session。利用它的两个方法setAttribute(),getAttribute()
2.       下面的这个实例实现了把第一个JSP页面的参数传递给第三个页面的功能
3.     &nbs ......

DELPHI TXMLDocument读取XML出现乱码的问题

XML文件
<?xml version="1.0" encoding="utf-8"?>
.......
因为原因很多,所以这个方法不一定能解决问题
XMLDocument1.LoadfromFile('test.XML');
XMLDocument1.Active:=TRUE;
XMLDocument1.Encoding:='gb2312';
memo1.Text:=XMLDocument1.XML.Text; ......

PHP+DOM创建XML文件

创建文档类型声明
一般而言,XML声明放在文档顶部。在PHP中声明十分简单:只需实例化一个DOM文档类的对象并赋予它一个版本号。查看程序清单A:
程序清单 A
<?php
// create doctype
$dom = new DOMDocument("1.0");
// display document in browser as plain text
// display document in browser as plain text ......

Perl解析XML文件时的字符集编码问题

http://stackoverflow.com/questions/1112828/cannot-decode-string-with-wide-characters-appears-on-a-weird-place
http://man.ddvip.com/web/xmlzhzn/xml_cn/xml_encoding.asp.htm
http://bbs.xml.org.cn/dispbbs.asp?boardID=8&ID=7226
http://topic.csdn.net/t/20030909/13/2240153.html
#
http://www.ezloo. ......

jsp乱码解决大全(转自csdn一高手)

jsp中文显示乱码解决方案
一、JSP页面显示乱码
二、表单提交中文时出现乱码
三、数据库连接
大家在JSP的开发过程中,经常出现中文乱码的问题,可能一至困扰着您,我现在把我在JSP开发中遇到
的中文乱码的问题及解决办法写出来供大家参考。
一、JSP页面显示乱码
下面的显示页面(display.jsp)就出现乱码:
< ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号