问题描述
- 下列代码,有许多已经设置居中了,但是还是居左,怎么回事?求大神指出,帮忙改正,谢谢
-
下列代码,有许多已经设置居中了,但是还是居左,怎么回事?求大神指出,帮忙改正,谢谢<%@page contentType="text/html; charset=UTF-8" import="java.util.*" %> <%@ page import="com.sysgrrj.common.PagerCommon" %> <%@ taglib prefix="s" uri="/struts-tags" %> <html> <head> <jsp:include page='/res/inc/inc.jsp' flush='true'/> </head> <body> <s:form action="Add" id="form1" name="form1" theme="simple"> <jsp:include page='/res/inc/inc_form_List.jsp' flush='true'/> <script type="text/javascript"> function doAction(action) { if ("add" == action) { var url = '/Module/TrainingOrCompetition/Add.action?iframeId=' +<s:property value="iframeId"/>; window.parent.openWinEdit(this, '训练或比赛', url, 0, 0); } else { var selectIds = ""; var arryObj = document.getElementsByName("selId"); var count = 0; for (var i = 0; i < arryObj.length; i++) { if (typeof arryObj[i].type != "undefined" && arryObj[i].type == "checkbox") { if (arryObj[i].checked) { selectIds = selectIds + arryObj[i].value + ","; count = count + 1; } } } if ("update" == action) { if (count == 0 || 1 < count) { alert('请先选择一条记录'); return false; } selectIds = selectIds.substring(0, selectIds.length - 1); var url = '/Module/TrainingOrCompetition/Edit.action?id=' + selectIds + '&iframeId=' +<s:property value="iframeId"/>; window.parent.openWinEdit(this, '训练或比赛', url, 0, 0); } else if ("del" == action) { if (count == 0) { alert('请先选择一条记录'); return false; } if (confirm("是否确认删除?")) { selectIds = selectIds.substring(0, selectIds.length - 1); document.getElementById("ids").value = selectIds; document.getElementById("form1").action = "Delete"; document.getElementById("form1").submit(); return true; } else { return false; } } } } // if ("update" == action) { // // var arryObj = document.getElementsByName("selId"); // var count = 0; // for (var i = 0; i < arryObj.length; i++) { // if (typeof arryObj[i].type != "undefined" && arryObj[i].type == "checkbox") { // if (arryObj[i].checked) { // selectIds = selectIds + "" + arryObj[i].value + ","; // count = count + 1; // } // } // } // if (count == 0 || 1 < count) { // alert('请先选择一条记录'); // return false; // } // // // alert(count); // } else if ("del" == action) { // // var arryObj = document.getElementsByName("selId"); // var count = 0; // for (var i = 0; i < arryObj.length; i++) { // if (typeof arryObj[i].type != "undefined" && arryObj[i].type == "checkbox") { // if (arryObj[i].checked) { // selectIds = selectIds + "" + arryObj[i].value + ","; // count = 1; // } // } // } // if (count == 0) { // alert('请先选择一条记录'); // return false; // } // // if (confirm("是否删除")) { // return true; // } // else { // return false; // } // } // var arryObj = document.getElementsByName("selId"); // var count = 0; // for (var i = 0; i < arryObj.length; i++) { // if (typeof arryObj[i].type != "undefined" && arryObj[i].type == "checkbox") { // if (arryObj[i].checked) { // selectIds = selectIds + "" + arryObj[i].value + ","; // //alert(selectIds); // count = 1; // } // } // } // if (count == 0) { // alert('请先选择一条记录'); // return false; // } // else { // // if (action == 3) { // var str = '/Module/Ddmxkaipiao/List.action?selectIds=' + selectIds + '&dingdanIdInfo=' + document.getElementById("form1_dingdanIdInfo").value; // //alert(str); // window.parent.addt('kp' + selectIds, '开 票', str); // // return true; // // } // if (action == 1) { // if (confirm("是否删除")) { // return true; // } // else { // return false; // } // } // return false; // } // } </script> <div class="buttonDiv"> <input type="button" class="button_style_add" onclick="return doAction('add')"/> <input type="button" class="button_style_edit" onclick="return doAction('update')"/> <input type="button" class="button_style_del" onclick="return doAction('del')"/> </div> <div class="validatemsg"> <s:actionerror/> <s:fielderror/> <s:actionmessage/> </div> <table width="100%" class="listext" id="table1"> <tr> <TH colspan="13" style="background: #EBEBEB;height: 35px"> 训练或比赛</TH> </tr> <tr> <TH width="11"><s:checkbox id="doAllSele" value="" onclick="selectAll()" name="doAllSele"></s:checkbox></TH> <TH width="30"> 序号</TH> <TH>名称</TH> <TH>日期</TH> <TH>添加人</TH> <TH>分类</TH> <TH>生产线设置</TH> <TH>厂房设置</TH> <TH>市场开拓管理 </TH> <TH>ISO资格认证设置</TH> <TH>原料设置</TH> <TH>产品研发设置</TH> <TH>其他参数设置</TH> </tr> <s:iterator value="trainingOrCompetitionList" status="st" var="cil"> <TR > <TD><input type="checkbox" name="selId" id="selId" value="<s:property value="id"/>"/></TD> <TD align="center"><s:property value='#st.index+1'/></TD> <TD><s:property value="mingCheng"/></TD> <TD><s:date name="riQi" format="yyyy-MM-dd"/></TD> <TD><s:property value="userName"/></TD> <TD><s:property value="fenLei"/></TD> <TD class="tdStyle" align="center"> <a href="javascript:window.parent.addt('1<s:property value="id"/>','<s:property value="mingCheng"/>生产线设置','/Module/SCXSZ/List.action?TrainingOrCompetitionID=<s:property value="id"/>')" >生产线设置</a> </TD> <TD class="tdStyle" align="center"> <a href="javascript:window.parent.addt('2<s:property value="id"/>','<s:property value="mingCheng"/>厂房设置','/Module/ChangFangSheZhi/List.action?TrainingOrCompetitionID=<s:property value="id"/>')" >厂房设置</a> </TD> <TD class="tdStyle" align="center"> <a href="javascript:window.parent.addt('3<s:property value="id"/>','<s:property value="mingCheng"/>市场开拓管理','/Module/SCKTGL/List.action?TrainingOrCompetitionID=<s:property value="id"/>')" >市场开拓管理</a> </TD> <TD class="tdStyle" align="center"> <a href="javascript:window.parent.addt('4<s:property value="id"/>','<s:property value="mingCheng"/>ISO资格认证设置','/Module/ISOZGRZSZ/List.action?TrainingOrCompetitionID=<s:property value="id"/>')" >ISO资格认证设置</a> </TD> <TD class="tdStyle" align="center"><a href="javascript:window.parent.addt('5<s:property value="id"/>','<s:property value="mingCheng"/>原料设置 ','/Module/YuanLiaoSheZhi/List.action?TrainingOrCompetitionID=<s:property value="id"/>')" >原料设置</a></TD> <TD class="tdStyle" align="center"> <a href="javascript:window.parent.addt('6<s:property value="id"/>','<s:property value="mingCheng"/>产品研发设置 ','/Module/CPYFSZ/List.action?TrainingOrCompetitionID=<s:property value="id"/>')" >产品研发设置</a> </TD> <TD class="tdStyle" align="center"> <a href="javascript:window.parent.addt('7<s:property value="id"/>','<s:property value="mingCheng"/>其他参数设置 ','/Module/QTCSSZ/getByTrainingOrCompetitionID.action?TrainingOrCompetitionID=<s:property value="id"/>')" >其他参数设置</a> </TD> </TR> </s:iterator> </table> </s:form> <% out.print(PagerCommon.getHtmlPage("./List.action", request)); %> </body> </html>
解决方案
class="tdStyle" 是否是对tdStyle写了css样式
解决方案二:
class="tdStyle" 是否是对tdStyle写了css样式
解决方案三:
tdStyle 写了什么样式?
解决方案四:
我运行你的代码都是居中啊
时间: 2025-01-27 05:52:41