我该怎么做“ const”?我该怎么做“ var”?最终我应该从哪里开始?

时间:2020-10-19 02:29:42

标签: function constants var

“因此,目标是使估算按钮显示基本价格+送货方式+外部成本+包括证明书+原包装*应纳税。此外,如果未选择送货方式,则屏幕上会显示错误消息。”

请帮助

谢谢

下面的代码

<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Collectable Calculator</title>

<style>
    thead{
        font-weight:bold;                       
    }
    
    td{
        padding-left:5px;
        padding-right:25px;         
    }
    
    td.estVal{
        text-align:right;           
    }
</style>

<script>
    
    // I REALLY REALLY NEED HELP

</script>   
<h1>HB Racers Collectable Quotes</h1>

<table>
    <thead>
        <tr>
            <td>PROD NO</td>
            <td>MODEL NAME</td>
            <td>BASE PRICE</td>
            <td>ESTIMATE</td>               
        </tr>
    </thead>
    <tbody>
        <tr>
            <td>00-MM</td>
            <td>The Mean Machine</td>
            <td><input id="txtFirst" type="text" size="10" value="24.50" readonly /></td>
            <td class="estVal"><span id="spnFirst"></span></td>             
        </tr>
        <tr>
            <td>02-CC</td>
            <td>The Creepy Coupe</td>
            <td><input id="txtSecond" type="text" size="10" value="35.00" readonly /></td>
            <td class="estVal"><span id="spnSecond"></span></td>                
        </tr>
        <tr>
            <td>01-BM</td>
            <td>The Boulder Mobile</td>
            <td><input id="txtThird" type="text" size="10" value="19.75" readonly /></td>
            <td class="estVal"><span id="spnThird"></span></td>             
        </tr>
        <tr>
            <td>03-CAC</td>
            <td>The Convert-A-Car</td>
            <td><input id="txtFourth" type="text" size="10" value="40.75" readonly /></td>
            <td class="estVal"><span id="spnFourth"></span></td>                
        </tr>
        <tr>
            <td>09-TT</td>
            <td>The Turbo Terrific</td>
            <td><input id="txtFifth" type="text" size="10" value="29.50" readonly /></td>
            <td class="estVal"><span id="spnFifth"></span></td>             
        </tr>
    </tbody>               
</table>

<h2>Options</h2>

<table>
    <tbody>
        <tr>
            <td class="estVal">Shipping Method:</td>
            <td>
                <select id="cboShip">
                    <option value="">Select One</option>
                    <option value="REG">Regular ($5.50)</option>
                    <option value="EXP">Express ($15.75)</option>
                    <option value="OVER">Overnight ($29.95)</option>            
                </select>   
                <!-- shipping message into the following span -->
                <span id="spnShipWarning" style="color:red;"></span>
            </td>                               
        </tr>
        <tr>
            <td class="estVal">Outside Costs:</td>
            <td>
                <input id="txtOutside" type="text" size="17" value="0" />
                <!-- outside costs message into the following span -->
                <span id="spnOutsideWarning" style="color:red;"></span>    
            </td>           
        </tr>
        <tr>
            <td class="estVal">Include Certificate:</td>
            <td><input id="chkFigure" type="checkbox" /> @ $2.75</td>                               
        </tr>
        <tr>
            <td class="estVal">Original Package:</td>
            <td><input id="chkOgPack" type="checkbox" /> @ $9.95</td>                               
        </tr>           
        <tr>
            <td class="estVal">Taxable:</td>
            <td><input id="chkTax" type="checkbox" /> @ 12%</td>                                
        </tr>        
        <tr>
            <td></td>
            <td>
                <button id="cmdCalc" onclick="">Estimate</button>
            </td>                               
        </tr>        
    </tbody>    
    </table>
</body>
</html>

我已经弄清了所有HTML,但无法弄清JavaScript,我可以在此使用一些指导,我将不胜感激。

0 个答案:

没有答案
相关问题