天啊啊啊啊 2017-05-21 12:27 采纳率: 50%
浏览 752
已采纳

为什么 request获取不了mysss[]的值?


<%response.Write request("mysss[]")   %>       
<html>
<head>
<meta charset="utf-8">
<title>动态创建按钮</title>
<script src='http://apps.bdimg.com/libs/jquery/2.1.4/jquery.min.js'></script>
<script>
$(document).ready(function() {
var MaxInputs    = 3; //maximum input boxes allowed
var InputsWrapper  = $("#InputsWrapper"); //Input boxes wrapper ID
var AddButton    = $("#AddMoreFileBox"); //Add button ID
var x = InputsWrapper.length; //initlal text box count
var FieldCount=1; //to keep track of text box added
var innerneirong='';
$(AddButton).click(function (e) //on add input button click
{
    if(x <= MaxInputs) //max input box allowed
    {
      FieldCount++; //text box added increment
      //add input box
      innerneirong='<div><input type="text" name="mysss[]" id="mysss'+FieldCount+'" value="输入收据编号 '+ FieldCount +'"/></div>'
     // $(InputsWrapper).append(innerneirong);
      $(InputsWrapper).append(innerneirong);
      x++; //text box increment
    }


return false;
});
$("body").on("click",".removeclass", function(e){ //user click on remove text
    if( x > 1 ) {
        $(this).parent('div').remove(); //remove text box
        x--; //decrement textbox
    }
return false;
})
});
</script>


</head>
<body>


<table width="100%" border="0" cellpadding="0" cellspacing="1" class="ta">
      <tr>
        <td colspan="2" align="left" valign="top" bgcolor="#FFFFFF">
          <table width="99%" border="0" cellspacing="2" cellpadding="2" >
          <form action="?action=1" method="post" name="form1" id="form1" >

          <tr>
       <tr>
              <td width="14%" height="30" align="right" valign="middle" class="t3"><font color="red">*</font>测试框子:</td>
              <td width="52%" height="30" align="left" valign="middle"> 
         <a href="#" rel="external nofollow" rel="external nofollow" rel="external nofollow" id="AddMoreFileBox" class="btn btn-info">添加更多的input输入框</a>&nbsp;

           <div id="InputsWrapper">
<div><input type="text" name="mysss[]" id="mysss1" value="输入收据编号 xxxx"   onkeyup="checktishi()" /><a href="#" rel="external nofollow" rel="external nofollow" rel="external nofollow" class="removeclass"><input type='button' value='删除'></a></div>
</div>


            </td>
              </tr>
            <tr>
              <td height="50" colspan="3" align="center" valign="middle"><input name="Submit" type="submit" class="inputbut" value="提交" />
          </td>
              </tr>
            </form>
          </table>

        </td>
        </tr>

    </table>


</body>
</html>

我测试的结果mysss[] 一直是“输入收据编号 xxxx”, $(InputsWrapper).append(innerneirong); 这个体现在页面,但request 获取不到值,是怎么回事哦

  • 写回答

2条回答 默认 最新

  • Go 旅城通票 2017-05-21 12:59
    关注
    
    <%response.Write request.getParameterValues("mysss[]")   %>  
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥15 uniapp uview http 如何实现统一的请求异常信息提示?
  • ¥15 有了解d3和topogram.js库的吗?有偿请教
  • ¥100 任意维数的K均值聚类
  • ¥15 stamps做sbas-insar,时序沉降图怎么画
  • ¥15 买了个传感器,根据商家发的代码和步骤使用但是代码报错了不会改,有没有人可以看看
  • ¥15 关于#Java#的问题,如何解决?
  • ¥15 加热介质是液体,换热器壳侧导热系数和总的导热系数怎么算
  • ¥100 嵌入式系统基于PIC16F882和热敏电阻的数字温度计
  • ¥20 BAPI_PR_CHANGE how to add account assignment information for service line
  • ¥500 火焰左右视图、视差(基于双目相机)