1

重複の可能性:
ページ ジャンプを挿入して同じページ内でタブを開く方法

同じページ内に新しいタブを開くページ ジャンプを挿入しようとしています。このリンクは eBay テンプレートに入ります。リスティングには、返品ポリシーを開くリンクが必要です (タブ 3)。

私は元々、IE と Mozilla で動作する以下のコードを使用しましたが、タブを開くだけで、ページにジャンプすることはありません。

<a href='#nogo' onclick="show('tab3')">Click Here To View Warranty Details</a>

以下のコードは機能し、タブ 3 を開き、ページを返品ポリシーまでスクロールしますが、mozilla only IE では機能しません。Mozilla では、このリンクをクリックすることさえできませんが、表示されます。

<a href='#infoTabs' onclick="show('tab3')">Click Here To View Warranty Details</a> 

これはショーリターンタブ3と4です(タブ3と4の流れを確認するためだけに)

     <!-- tab 3 --><a name="returns"></a>
        <div id="tab3">
        <ul class="tablinks">
            <li><a href="#nogo" onclick="return show('tab1')">Shipping</a> </li>
            <li><a href="#nogo" onclick="return show('tab2')">Payment</a> </li>
            <li><span>Return Policy</span> </li>
            <li><a href="#nogo" onclick="return show('tab4')">General Info</a> </li>
            <li><a href="#nogo" onclick="return show('tab5')">Intl. Shipping</a> </li>
        </ul>
        <h4 class="tabtitle">Return Policy</h4>
        <ul class="tabinfo"><strong><span style="font-family: verdana, arial, helvetica, sans-serif; color: #293d86;">AudioSavings Return Policy:</span></strong><span style="font-family: verdana, arial, helvetica, sans-serif;"><br />
            <br />
            <strong><span style="color: #293d86;">At Audiosavings, we strongly believe in customer satisfaction and therefore offer a friendly return policy.</span></strong><strong><span style="color: #293d86;"> </span></strong><br />
            <br />
            You may return items to Audiosavings within <strong><span style="color: #293d86;">30 DAYS</span></strong> of purchase. <br />
            <br />
            Warranty Repair Period: <strong><span style="color: #293d86;">1 YEAR</span></strong><br />
            <br />
            <strong><span style="color: #293d86;">Prior to returning merchandise to us you must request a Return Merchandise Authorization Number (RMA#). The RMA# will be valid for 15 days from the date it was issued. </span></strong><strong><span style="color: #293d86;"></span></strong><br />
            <br />
            <strong><span style="color: #293d86;">Defective items</span></strong><br />
            We will replace a defective unit with the same unit within the 30 day period. If for any reason you prefer to exchange your item for a different product, we will issue a store credit for the full price of the item, minus the outgoing shipping costs that were paid to ship the original item to you. Refunds are also available during the initial 30 day period. Refunds are subject to a 10% processing fee and a deduction of the outgoing shipping costs from the total refund amount. If you prefer that we simply replace the item, then there will be no fee charged.<strong><span style="color: #293d86;"></span></strong><br />
            <br />
            <strong><span style="color: #293d86;">Exchanges for different items</span></strong><strong><span style="color: #293d86;"> </span></strong><br />
            If you purchase an item and for any reason want to exchange it for a different product, we are happy to help you do so as long as you contact us within 30 days from the original date of purchase. If the returned item is brand new and still factory sealed, we will issue a store credit for the full price of the item, minus the outgoing shipping costs that were paid to get the original item to you. If the item comes back to us in used or open box condition, there will be in addition to the shipping charges, a 10% processing fee deducted from the issued store credit. (When items are returned that can no longer be sold as brand new, we must then sell them at a significantly cheaper price, therefore we must charge a 10% processing fee for open box return items).<br />
            <br />
            <strong><span style="color: #293d86;">Refunds</span></strong><br />
            Refunds are available within 30 days of the original date of purchase. All refunds will have a 10% processing fee assessed, and the outgoing shipping costs that were paid will also be deducted from the refund total. Please remember, if you choose to exchange the item, and the returned item is still factory sealed, there will be NO processing fee assessed.<strong><span style="color: #293d86;"></span></strong><br />
            <br />
            <strong><span style="color: #293d86;">Replacement/Processing Time</span></strong><br />
            We work hard to process returns as quickly as possible. Your replacement or refund will process within 4 business days of when we receive the item and inspect it at our store. We can only exchange items after we&rsquo;ve received the returned items. <br />
            <strong><span style="color: #293d86;">NOTE:</span></strong> If you need the item sooner, you may choose to do an advanced exchange; wherein you would place a new order for the item, and send back the item you wish to exchange for a full refund with no processing fee, as long as all included pieces and accessories are received with the returned item. <br />
            <br />
            <strong><span style="color: #293d86;">Return shipping</span></strong> <br />
            We will cover all outgoing shipping costs incurred to ship the newly exchanged item to you. The return shipping costs required to ship the item back to our store, are always paid by the customer. <br />
            <br />
            <strong><span style="color: #293d86;">Past 30 days</span></strong><br />
            If the product develops a defect past the first 30 days, we will send you the necessary warranty information to get the item repaired or exchanged (depending on the manufacturer). If any customer has any issue processing a warranty with a manufacturer, we will get involved and do our best to make sure your item gets serviced.<br />
            <br />
            <strong><span style="color: #293d86;">Return Exceptions</span></strong> <br />
            While we always do our best to take back any and all returns, there are a few exceptions of items that cannot be returned to our store due to the fact that the manufacturers will not accept these items back from us. The following are examples of items that cannot be returned:<br />
            <br />
            <ul class="tabinfo">
                <li>Items with physical damage un-related to shipping, i.e., cracked or broken items are not covered under warranty. In the case that you receive an item that has physical damage that occurred during shipping, please notify us within <strong><span style="color: #293d86;">48 hours</span></strong> of when you received the item, and you will be taken care of immediately. </li>
                <li>You <strong><span style="color: #293d86;">MUST notify us within 48 hours</span></strong> if you receive an item that was damaged during shipping. </li>
                <li>Software that has already been registered or installed cannot be returned </li>
                <li>Blown speakers or subwoofers that have burned voice coils or punctured holes are not supposed to be covered under warranty, but we will still <strong><span style="color: #293d86;">do our best</span></strong> to help you get coverage. </li>
            </ul>
            <strong><span style="color: #293d86;">We will always do our best to warranty your product!</span></strong><br />
            <br />
            <strong><span style="color: #293d86;">Process for returning items</span></strong> <br />
            In order to best serve you please follow the instructions below: <br />
            Please <a href="http://contact.ebay.com/ws/eBayISAPI.dll?FindAnswers&amp;redirect=0&amp;requested=audiosavings" target="_blank">email us</a> with <br />
            <ul class="tabinfo">
                <li>Your eBay user ID </li>
                <li>Item code / model # </li>
                <li>Condition of the item (ex: Brand New Sealed, Open Box NEW, Used, Defective) </li>
                <li>The reason for your return </li>
                <li>Please indicate whether you would like an exchange, store credit or a refund. </li>
            </ul>
            We will supply you with a reference number (RMA #) to put on the package which will ensure quick processing of your return. &nbsp;<strong><span style="color: #293d86;">All returns require a RMA# to be returned back to our facility.</span></strong> We will promptly reply back with helpful instructions on how to return the product.</span> <br />
            &nbsp;</ul>
            </div>
            <!-- tab 4 --><a name="info"></a>
            <div id="tab4">
            <ul class="tablinks">
                <li><a href="#nogo" onclick="return show('tab1')">Shipping</a> </li>
                <li><a href="#nogo" onclick="return show('tab2')">Payment</a> </li>
                <li><a href="#nogo" onclick="return show('tab3')">Return Policy</a> </li>
                <li><span>General Info</span> </li>
                <li><a href="#nogo" onclick="return show('tab5')">Intl. Shipping</a> </li>
            </ul>
            <h4 class="tabtitle">General Info</h4>
            <ul class="tabinfo">
                <li><b>Sales Tax:</b> 8.625% in New York only </li>
                <li>Please only click on the buy it now button once if you want one item. </li>
                <li>Our goal is to satisfy all our customers by offering the best possible customer service, and a great selection of great products. </li>
            </ul>
            </div>

<!-- tab 5 --><a name="about"></a>
            <div id="tab5">
            <ul class="tablinks">
                <li><a href="#nogo" onclick="return show('tab1')">Shipping</a> </li>
                <li><a href="#nogo" onclick="return show('tab2')">Payment</a> </li>
                <li><a href="#nogo" onclick="return show('tab3')">Return Policy</a> </li>
                <li><a href="#nogo" onclick="return show('tab4')">General Info</a> </li>
                <li><span>Intl. Shipping</span> </li>
            </ul>
            <h4 class="tabtitle">International Shipping</h4>
            <ul class="tabinfo">
                <li><b>International Buyers - Please Note:</b><br />
                Import duties, taxes and charges are not included in the item price or shipping charges. These charges are the buyer's responsibility. Please check with your country's customs office to determine what these additional costs will be prior to bidding/buying. </li>
                <li><b>For International Customers only:</b> <br />
                Please be advised that for 120 Volt product, you will need a 
                step-down transformer if you live in a country that uses 220 
                Volt outlets. Car products will work without a transformer. </li>
            </ul>
            <p><br />
            </div>
            <script> var shown = document.getElementById('tab1'); function show(id) { if (shown) shown.style.display = 'none'; shown = document.getElementById(id); shown.style.display = 'block'; return false; } </script>
            </div>
            <center><b>Item Code: ##item_cd##</b><br />
            <br />
            <a href="#top">Top</a> </center></div>
            </div>
            <div></div>
            </td>
        </tr>
        <tr>
            <td id="tru_footer">&nbsp;</td>
        </tr>
    </tbody>
</table>

これを修正する方法と、なぜそれが起こっているのか知っている人はいますか?

ここにリンクがあり ます http://www.ebay.com/itm/MA-AUDIO-HK-802SX-4400w-RMS-2-CH-CAR-AMPLIFIER-HK802SX-/390483744599?pt=Car_Amplifiers&vxp=mtr&hash=item5aeaa51757

4

1 に答える 1

0

探している「ジャンプ」が得られないのは、正しい名前のアンカーがないためと思われます。

あなたがこれを持っているなら:

<a href='#infoTabs' onclick="show('tab3')">

次に、対応するものが必要です:

<a id="infoTabs"></a>

の名前のアンカーがあることに気付きました info。同じになるように、アンカーまたはhrefの名前を変更する必要があります。

ただし、これが問題であることを確認するには、 show関数の内容を確認する必要があります。

于 2012-12-17T18:09:43.643 に答える