jQuery组合输入框

时间:2015-09-08 05:20:12

标签: jquery

<table border="1" cellpadding="2" cellspacing="2" style="margin-top: 3px;" id="shortPeriodTable">
    <form id="shortLicenseForm" name="shortLicenseForm" action="saveShortPeriodLicense" method="POST" onsubmit="return false;"></form>

    <tbody>

        <tr id="dayRateDayRow" style="display: none;">

            <td align="center" width="30%" class="">Day Rate-(Days)</td>
            <td align="left">
                <input name="time_Period" id="dayRateDay" value="1" style="width: 30%;"> Day
            </td>
            <td align="left">
                <input name="amount" id="dayRateAmnt" style="width: 30%;" maxlength="4"> Rs.
            </td>
        </tr>
        <tr id="slabRateDayRow" style="display: table-row;">
            <td align="center" width="30%" class="">Slab Rate-(Days)</td>
            <td align="left">
                <input name="slabRateDay11" id="slabRateDay1" maxlength="3"> Days</td>
            <td align="left">
                <input name="slabRateDay11Amount" id="slabRateAmnt1" maxlength="4"> Rs.</td>
            <td align="left"><img alt="Add-Row" id="addRowDaySlab" src="common/images/addrow.gif"></td>

        </tr>
        <tr id="dayRateMonthRow" style="display: none;">

            <td align="center" width="30%">Day Rate-(Days-MOnth)
            </td>
            <td align="left">
                <input name="time_Period" id="dayRateMonth">
            </td>
            <td align="left">
                <input name="amount" id="dayRateMonthAmnt" maxlength="4"> Rs.
            </td>
        </tr>
        <tr id="slabRateMonthRow" style="display: none;">
            <td align="center" width="30%">Slab Rate-(Days-Month)
            </td>
            <td align="left">
                <input name="slabRateMonth" id="slabRateMonth1" maxlength="2"> Month</td>
            <td align="left">
                <input name="slabRateMonthAmount" id="slabRateMonthAmnt1" maxlength="4"> Rs</td>
            <td align="left"><img alt="Add-Row" id="addRowMonthSlab" src="common/images/addrow.gif"></td>
        </tr>
        <tr class="slabRateDays">
            <td align="center" width="30%"></td>
            <td align="left">
                <input name="slabRateDay11" id="slabRateDay2" maxlength="3"> Days</td>
            <td align="left">
                <input name="slabRateDay11Amount" id="slabRateAmnt2" maxlength="4"> Rs</td>
            <td align="left"><img alt="Delete-Row" onclick="deleteRowDaySlab(this);" src="common/images/removerow.gif"></td>
        </tr>
        <tr class="slabRateDays">
            <td align="center" width="30%"></td>
            <td align="left">
                <input name="slabRateDay11" id="slabRateDay3" maxlength="3"> Days</td>
            <td align="left">
                <input name="slabRateDay11Amount" id="slabRateAmnt3" maxlength="4"> Rs</td>
            <td align="left"><img alt="Delete-Row" onclick="deleteRowDaySlab(this);" src="common/images/removerow.gif"></td>
        </tr>
        <tr class="slabRateDays">
            <td align="center" width="30%"></td>
            <td align="left">
                <input name="slabRateDay11" id="slabRateDay4" maxlength="3"> Days</td>
            <td align="left">
                <input name="slabRateDay11Amount" id="slabRateAmnt4" maxlength="4"> Rs</td>
            <td align="left"><img alt="Delete-Row" onclick="deleteRowDaySlab(this);" src="common/images/removerow.gif"></td>
        </tr>
    </tbody>
</table>

在上表中,有一些名为DaysRs.的输入框的组合。这些盒子的组合应该不一样。例如,在Days输入框中,如果输入值1并且在Rs输入框中,如果输入200,则其他输入框不应包含相同的组合。

如果它包含重复组合,相应的输入框应以红色突出显示并缓慢淡出。这应该发生在按键上。如何使用jQuery做到这一点?

0 个答案:

没有答案