0

我想要一张桌子右边有一张图片的桌子。

这是我想要的(在油漆上做的):

在此处输入图像描述

这是我的 html :(不要关心“jsp”中的“if”)。例如最后一行代码(在“if”之后):<td class="noborder"><img src="img/refresh.png" class="refreshButton" alt="Refresh" id="sameRightsAsRefresh" href="Javascript:void;"></img></td>

这是CSS:

table td,table th 
{
    border: 1px ridge black;
    padding: 3px;
}

td.noborder {
    border:0
}

我想让我的按钮在 SameRightsAs、用户名和姓氏的右侧刷新。

完整代码:

<!-- FIRST TABLE : REQUESTOR -->
            <form id="form" method="post" action="mainServlet?command=FillBlanks&amp;">
                <p class="tableHead">Request For:</p>
                <table class="requestor">

                    <tr>
                        <td class="reqCellLabel">Username:</td>
                        <td class="reqCellAnswer" id="oracleUsername"><input id="oracleUsernameText" class="reqCellAnswer" onchange="fillBlanks(this.id,this.value)"
                            type="text" name="Requestor" <%if( Integer.parseInt(request.getParameter("isCreation")) == 1){%> readonly <%}%>></input></td>
                    </tr>
                    <tr>
                        <td class="reqCellLabel">Oracle Employee #:</td>
                        <td class="reqCellAnswer" id="oracleEmployeeNumber"><input id="oracleEmployeeNumberText" class="reqCellAnswer"
                            type="text" name="Requestor" ></input></td>
                    </tr>
                    <tr>
                        <td class="reqCellLabel">Last name:</td>
                        <td class="reqCellAnswer" id="lastName"><input id="lastNameText" class="reqCellAnswer"
                            type="text" name="Requestor" ></input></td>
                    </tr>

                    <tr>
                        <td class="reqCellLabel">First name:</td>
                        <td class="reqCellAnswer" id="firstName"><input id="firstNameText" class="reqCellAnswer"
                            type="text" name="Requestor" ></input></td>
                    </tr>

                    <tr>
                        <td class="reqCellLabel">Timezone:</td>
                        <td class="reqCellAnswer" id="timeZone"><input id="timeZoneText" class="reqCellAnswer"
                            type="text" name="Requestor" ></input></td>
                    </tr>

                    <tr>
                        <td class="reqCellLabel">Default Printer:</td>
                        <td class="reqCellAnswer" id="defaultPrinter"><input id="defaultPrinterText" class="reqCellAnswer"
                            type="text" name="Requestor"  value=""></input></td>
                    </tr>
                    <tr>
                        <td class="reqCellLabel">Employee is a buyer ?</td>
                        <td class="reqCellAnswer" id="employeeIsBuyer"><input id="employeeIsBuyerText" class="reqCellAnswer"
                            type="text" name="Requestor" ></input></td>
                    </tr>
                    <tr>
                        <td class="reqCellLabel">Same rights as :</td>
                        <td class="reqCellAnswer" id="sameRightsAs"><input id="sameRightsAsText" name="sameRightsAsText" class="reqCellAnswer" onchange="sameRightsAs(this.id,this.value)"
                            type="text" name="Requestor" <%if( Integer.parseInt(request.getParameter("isCreation")) == 0){%> disabled <%}%>></input></td>
                        <%if( Integer.parseInt(request.getParameter("isCreation")) == 1){%> <td class="noborder"><img src="img/refresh.png" class="refreshButton" alt="Refresh" id="sameRightsAsRefresh" href="Javascript:void;"></img></td><%}%>
                    </tr>
                </table>

            </form>
</body
4

1 回答 1

0

像这样的东西?请注意,您所有的文本字段都具有相同的名称,当您提交表单时,最后一个将是可接受的值,但也许是一个例子,我希望 :)

<table class="requestor">

                    <tr>
                        <td class="reqCellLabel">Username:</td>
                        <td class="reqCellAnswer" id="oracleUsername"><input id="oracleUsernameText" class="reqCellAnswer" onchange="fillBlanks(this.id,this.value)"
                            type="text" name="Requestor"></input></td>
                        <td class="noborder" id="oracleUsername"><img src="refresh.jpg" width="16" height="16" /></td>
                    </tr>
                    <tr>
                        <td class="reqCellLabel">Oracle Employee #:</td>
                        <td class="reqCellAnswer" id="oracleEmployeeNumber"><input id="oracleEmployeeNumberText" class="reqCellAnswer"
                            type="text" name="Requestor" ></input></td>
                        <td class="noborder" id="oracleEmployeeNumber">&nbsp;</td>
                    </tr>
                    <tr>
                        <td class="reqCellLabel">Last name:</td>
                        <td class="reqCellAnswer" id="lastName"><input id="lastNameText" class="reqCellAnswer"
                            type="text" name="Requestor" ></input></td>
                        <td class="noborder" id="lastName">&nbsp;</td>
                    </tr>

                    <tr>
                        <td class="reqCellLabel">First name:</td>
                        <td class="reqCellAnswer" id="firstName"><input id="firstNameText" class="reqCellAnswer"
                            type="text" name="Requestor" ></input></td>
                        <td class="noborder" id="firstName">&nbsp;</td>
                    </tr>

                    <tr>
                        <td class="reqCellLabel">Timezone:</td>
                        <td class="reqCellAnswer" id="timeZone"><input id="timeZoneText" class="reqCellAnswer"
                            type="text" name="Requestor" ></input></td>
                        <td class="noborder" id="timeZone">&nbsp;</td>
                    </tr>

                    <tr>
                        <td class="reqCellLabel">Default Printer:</td>
                        <td class="reqCellAnswer" id="defaultPrinter"><input id="defaultPrinterText" class="reqCellAnswer"
                            type="text" name="Requestor"  value=""></input></td>
                        <td class="noborder" id="defaultPrinter">&nbsp;</td>
                    </tr>
                    <tr>
                        <td class="reqCellLabel">Employee is a buyer ?</td>
                        <td class="reqCellAnswer" id="employeeIsBuyer"><input id="employeeIsBuyerText" class="reqCellAnswer"
                            type="text" name="Requestor" ></input></td>
                        <td class="noborder" id="employeeIsBuyer">&nbsp;</td>
                    </tr>
                    <tr>
                        <td class="reqCellLabel">Same rights as :</td>
                        <td class="reqCellAnswer" id="sameRightsAs"><input id="employeeIsBuyerText" class="reqCellAnswer"
                            type="text" name="Requestor" ></input></td>
                        <td class="noborder" id="sameRightsAs"><img src="refresh.jpg" alt="" width="16" height="16" /></td>

                    </tr>
                </table>
于 2013-02-22T16:28:20.440 回答