易截截图软件、单文件、免安装、纯绿色、仅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


相关文档:

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; ......

.net 操作XML小结

一、简单介绍
using System.Xml;
//初始化一个xml实例
XmlDocument xml=new XmlDocument();
//导入指定xml文件
xml.Load(path);
xml.Load(HttpContext.Current.Server.MapPath("~/file/bookstore.xml"));
//指定一个节点
XmlNode root=xml.SelectSingleNode("/root");
//获取节点下所有直接子节点
XmlNodeList ch ......

支持几乎所有浏览器的js载入xml文件

1.route.xml文件内容
<?xml version="1.0" encoding="GBK"?>
<root>
<route id="1111">
<id>111</id>
<name>四川</name>
<path>www.baidu.com/hehe.html</path>
</route>
</root>
2.test.html代码
<html>
<body>
<script> ......

C# Xml中映射为类数据结构(报文)

        [System.Runtime.Serialization.DataMemberAttribute()]
        public Information Archive {
            get {
         &n ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号