前台用的是<html:text>标签
request中按照一定格式取得控件值得
我应该怎样才能从request中取到这个标签的值

解决方案 »

  1.   

    <html:text name="password" type="password" value="" />后台:request.getParameter("password");
      

  2.   


    那如果我给这个name加上一定的格式  我该怎么取 
    name应该是form中的一个属性吧
      

  3.   


    你可以这样处理
    <html:text name="password" id="pwd" type="password" value="" />
    document.getAttributeById("pwd");
    这样便获得了 text对象
      

  4.   

    <html:text name="password" id="pwd" type="password" value="" />
    document.getAttributeById("pwd");
    <html:text >   没有这个 id  attribute  你可以试下   
      

  5.   


    那就  先获得form对象  frm=document.formName
    然后根据form得到text对象  pwd=frm.password