我在一個允許我更改我們許可的網站軟件的HTML代碼的應用程序中工作。我遇到了一個問題,即所有的字段都立即顯示出來,並不完全確定如何將它們改變爲僅在被調用時才顯示。我已經在這個場景中看到很多關於Jquery的討論,但是沒有關於這個或者任何應用它的知識,所以我需要用HTML或者嵌入的javascript來完成這個HTML單元格的內部。任何幫助是極大的讚賞!用javascript隱藏部分表格
選擇付款方式:
<div id="ctl00_content_CartBilling_ucPaymentMethod_divPaymentMethodText" class="PromptText">
<strong><span id="ctl00_content_CartBilling_ucPaymentMethod_Stringcontrol1"><b>Choose Payment Method:</b></span></strong>
支付方式選擇
<div id="ctl00_content_CartBilling_ucPaymentMethod_divDdlPaymentMethod" class="SideMargin20">
<select name="ctl00$content$CartBilling$ucPaymentMethod$ddlPaymentMethod" id="ctl00_content_CartBilling_ucPaymentMethod_ddlPaymentMethod" class="DropDownMin150" onchange="CheckPurchaseMethodForNonCC(this);">
<option selected="selected" value="2">Credit Card</option>
<option value="11">Departmental Charge (enter number below)</option>
需要
其他元素來隱藏當 「信用卡」 選擇下拉的活躍
<div id="ctl00_content_CartBilling_divCostCenterDDL" class="SideMargin20">
<select name="ctl00$content$CartBilling$ddlCostCenter" onchange="javascript:setTimeout('__doPostBack(\'ctl00$content$CartBilling$ddlCostCenter\',\'\')', 0)" id="ctl00_content_CartBilling_ddlCostCenter" class="DropDownMin150">
<option selected="selected" value="0"></option>
<option value="1097005">1 - Credit Card</option>
<option value="1148142">2 - Account Charge</option>
<tr>
<td colspan="3">
<div id="w2p_form"><table width="100%" cellpadding="0" cellspacing="0" border="0" align="center"><tbody><tr><td><div class="PromptText"><strong><span>Full Account Number:</span></strong> <span>(All Products)</span></div></td></tr><tr><td><div class="SideMargin20"><input name="CustomOrderField_69773" type="text" id="CustomOrderField_69773" size="50" maxlength="50" runat="server" onkeyup="SetItemLevelCustomOrderFieldTextBoxes(this, 'txtItemLevelCustomOrderField1');"></div></td></tr><tr><td><div class="PromptText"><strong><span>Postage Method (If applicable):</span></strong> <span>(All Products)</span></div></td></tr><tr><td><div class="SideMargin20"><select name="CustomOrderField_69806" onchange="SetItemLevelCustomOrderFieldDropDown(this, 'ddlItemLevelCustomOrderField2');" id="CustomOrderField_69806" size="1" runat="server" align="top" style="vertical-align:top;width:122.8841px;">
<option value="12557~^&USPS Bulk">USPS Bulk</option>
<option value="12590~^&USPS First Class">USPS First Class</option>