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

struts1怎么通过在js里设置<html:form>的action的值来实现action跳转

2012-07-08 
struts1如何通过在js里设置html:form的action的值来实现action跳转struts1如何通过在js里设置html:form

struts1如何通过在js里设置<html:form>的action的值来实现action跳转

struts1如何通过在js里设置<html:form>的action的值来实现action跳转

解决方法:
1.在struts1中有<a href="<html:rewrite action='/control/brand/lis...
2.struts1 里form action= 跳转路径问题。解决方法:
<form method="post" action="user.do?act=login&loginName="+loginName+"&password="+password />

????

??? ?<form method="post" action="user.do?act=login“ />
??????????????user是action,login是action里面的方法


??在JS里面,怎么取struts的<html:form>标签里面的<html:text propert...
??????? document.getElementById("formId").action = "xxxx.do?p=initHome";
求助用JS改变form 内的action值
???

?在配置文件里要有相关的配置
?? <action type="相关的action" scope="request" path="/login">
??????? <forward name="login" path="/index.jsp"/>
?????? <forward name="类的方法" path="要去的页面,也可以是另一方法">
??? </action>
path就是xxx.do

jsp中的form表单中要配置action 如:
<form action="login.do?actionType=query">
相关内容:js里有个document.forms[],forms[]可以当成是页面的所有forms的数组来用,如果要设置action直接document.forms[num].action="path";然后document.forms[num].submit();

热点排行