我用javascript創建并提交的from為什么傳入Action里的from為null?
function Obj_Util(BeanName,BeanClass,BeanMethod){
this.BeanName=BeanName;
this.BeanClass=BeanClass;
this.BeanMethod=BeanMethod;
this.paremeters=new Array();
this.html=
' <div style= "display:none "> \n '+
' <form id= "UseBeanForm " action= " ' + Fn_GetCurrPath() + '../util.do?method=bean " method= "POST "> \n '+
' <input type= "text " name= "view.name " value= " ' + this.BeanName + ' "/> \n '+
' <input type= "text " name= "view.type " value= " ' + this.BeanClass + ' "/> \n '+
' <input type= "text " name= "view.method " value= " ' + this.BeanMethod + ' "/> \n ';
Obj_Util.prototype.setParemeter=function (paremeter){
this.paremeters[this.paremeters.length]=paremeter;
this.html=this.html+
' <input type= "text " name= "view.paremeter " value= " ' + paremeter + ' "/> \n ';
};
Obj_Util.prototype.getParemeter=function (){
return this.paremeters;
};
Obj_Util.prototype.submit=function (){
this.html=this.html+
' </form> \n '+
' </div> \n ';
var BodyHtml=document.body.innerHTML;
document.body.innerHTML=BodyHtml+this.html;
document.forms[ "UseBeanForm "].submit();
document.body.innerHTML=BodyHtml;
};
}
------解决方案--------------------很多原因,看看你的配置有问题不,标签正确与否
------解决方案--------------------action是根据的form的name,不是id,我看你只定义了id