求大神告知 ,为什么我的select下拉菜单不显示?是被哪个标签覆盖了吗?求改正,求指导

求大神告知 ,为什么我的select下拉菜单不显示?是被哪个标签覆盖了吗?求改正,求指导

<%@page contentType="text/html;  charset=UTF-8" import="java.util.*" %>
<%@ page import="com.sysgrrj.module.ChangFangGouMai.valueobject.ChangFangGouMai" %>
<%@ page import="com.sysgrrj.common.TypeChange" %>
<%@  taglib prefix="s" uri="/struts-tags" %>
<html>
<head>
    <jsp:include page='/res/inc/inc.jsp' flush='true'/>
</head>
<body>
<s:form action="List" id="form1" theme="simple">
    <jsp:include page='/res/inc/inc_form_List.jsp' flush='true'/>
    <script type="text/javascript">
        function doAction(action) {
            if (confirm("是否确认保存?")) {

                document.getElementById("form1").action = "<%=request.getContextPath()%>/Module/ChangFangGouMai/List_save.action";
                document.getElementById("form1").submit();
                return true;
            }
            else {
                return false;
            }
        }




    </script>


    <div class="buttonDiv">


        <input type="button" class="button_style_save" onclick="doAction('')"/>
    </div>
    <div class="validatemsg">
        <s:actionerror/>
        <s:fielderror/>
        <s:actionmessage/>
    </div>

    <%


           //厂房购买
           List<ChangFangGouMai> changFangGouMaiList = (List<ChangFangGouMai>) request.getAttribute("changFangGouMaiList");


       %>





<table width="100%" class="listext" id="table1">
        <tr>
            <TH colspan="7" style="background:  #EBEBEB;height: 35px"> 厂房购买</TH>
        </tr>
    <TR>

       <TH width="30"> 序号</TH>
       <TH width="80">编号</TH>
       <TH>1</TH>
       <TH>2</TH>
       <TH>3</TH>
        <TH>4</TH>

       <%--<TH>trainingOrCompetitionID</TH>--%>
    </TR>

       <%   int i;
           int k;
           int j;
             String[] s;
              s=new String[6];
             for(j=1;j<7;j++){
                 String a[]={"第一年","第二年","第三年","第四年","第五年","第六年"};
        %>
      <TR>

          <TD><%=(j)%> </TD>
           <TD><%=(a[j-1])%> </TD>
          <%
             for(i=1;i<5;i++){
                 out.print("  <TD>");
                  String sr= "";
                 for(k=0;k<changFangGouMaiList.size();k++){
                     ChangFangGouMai changFangGouMai=changFangGouMaiList.get(k);
                     if(TypeChange.stringToInt(changFangGouMai.getNianDu())==j&&changFangGouMai.getBianHao()==i){
                     out.print("<s:select list=\"#{1:'租用',2:'购买'}\" name=\"changFangGouMai.zuYongHuoGouMai\" value=\"sr\" listKey=\"key\" listValue=\"value\" headerKey=\"000\" headerValue=\"请选择\"/>");
                     out.print("</TD>");
                         break;
                     }
                 }


             }
          %>







       </TR>

      <%

          }

        %>
</TABLE>
    <s:hidden name="TrainingOrCompetitionID"/>
</s:form>
</body>
</html>



3个回答

在页面断点下面的java代码看看满足条件执行了吗

  <%
             for(i=1;i<5;i++){
                 out.print("  <TD>");
                  String sr= "";
                 for(k=0;k<changFangGouMaiList.size();k++){
                     ChangFangGouMai changFangGouMai=changFangGouMaiList.get(k);
                     if(TypeChange.stringToInt(changFangGouMai.getNianDu())==j&&changFangGouMai.getBianHao()==i){
                     out.print("<s:select list=\"#{1:'租用',2:'购买'}\" name=\"changFangGouMai.zuYongHuoGouMai\" value=\"sr\" listKey=\"key\" listValue=\"value\" headerKey=\"000\" headerValue=\"请选择\"/>");
                     out.print("</TD>");
                         break;
                     }
                 }


             }
          %>

out.print("");这里不要用反斜杠进行转义,改成这样试一试:
out.print("");

ascdfwsfrfadfg
inc1ud3 回复baidu_29643173:在哪里看啊
4 年多之前 回复
baidu_29643173
baidu_29643173 哥 能不能帮我看一眼,我最新的问题
4 年多之前 回复

我擦 这网站有毒改的没了怎么,

 out.print("<s:select list=\"#{1:'租用',2:'购买'}\" name=\"changFangGouMai.zuYongHuoGouMai\" value=\"sr\" listKey=\"key\" listValue=\"value\" headerKey=\"000\" headerValue=\"请选择\"/>");

改成

 out.print("<s:select list='#{1:"租用",2:"购买"}' name='changFangGouMai.zuYongHuoGouMai' value='sr' listKey='key' listValue='value' headerKey='000' headerValue='请选择'/>");
Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
立即提问