天啊啊啊啊 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条)

报告相同问题?

悬赏问题

  • ¥100 Jenkins自动化部署—悬赏100元
  • ¥15 关于#python#的问题:求帮写python代码
  • ¥20 MATLAB画图图形出现上下震荡的线条
  • ¥15 关于#windows#的问题:怎么用WIN 11系统的电脑 克隆WIN NT3.51-4.0系统的硬盘
  • ¥15 perl MISA分析p3_in脚本出错
  • ¥15 k8s部署jupyterlab,jupyterlab保存不了文件
  • ¥15 ubuntu虚拟机打包apk错误
  • ¥199 rust编程架构设计的方案 有偿
  • ¥15 回答4f系统的像差计算
  • ¥15 java如何提取出pdf里的文字?