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
相关文档:
创建文档类型声明
一般而言,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 ......
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> ......
<asp:DropDownList ID="compactType" runat="server" AutoCallBack="True" Width="153px"> </asp:DropDownList>
<?xml version="1.0" encoding="utf-8" ?>
<roots>
<root>
<id>1</id>
<Culture> ......
本文首发代码天下,转载请注明来源代码天下,谢谢。
今天上班时遇到一个问题,游戏官反应一个用户充不了值。充不了值一般为用户角色不正确,我仔细检查发现该用户角色有点异常,因为对方返回角色是xml,我贴上来给大家看一下:
<Result value="true" message="Success!"> <It ......