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

小弟我用javascript創建并提交的from為什么傳入Action里的from為null

2012-02-14 
我用javascript創建并提交的from為什么傳入Action里的from為null?functionObj_Util(BeanName,BeanClass,Be

我用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

热点排行