2014-03-14 50 views
0

我的第一個div作爲jQuery中我與另一個DIV替換DIV

<div class ="amazon"> 
    <form target="OffAmazonPaymentsPopupWindowA24SYJTTYUTWN2" method="POST" action="https://payments.amazon.com/gp/widgets/widgets" id="OffAmazonPaymentsWidgets0Form" style="display: block; margin: 0; padding: 0; border-width: 0; overflow: hidden;"> 
    <input type="hidden" value="connect" name="action"> 
    <input type="hidden" value="https://jsdentallab.com/my-account/checkout/" name="referringURL"> 
    <input type="hidden" value="A24SYJTTYUTWN2" name="cartOwnerId"><input type="hidden" value="true" name="useAmazonAddressBook"> 
    <input type="hidden" value="" name="agreementType"> 
    </form> 
</div> 
    Have an Amazon account? 
</div> 
    <div id="pay_with_amazon"> 
     <img src="https://payments.amazon.com/gp/widgets/button?sellerId=A24SYJTTYUTWN2&amp;size=large&amp;color=orange"> 
    </div> 
</div> 

這將與新建空白股利類

我也下文稱.replaceWith()

您能否提供可更換me

謝謝

+0

什麼是你的代碼? – xdazz

+0

這必須用哪個div替換 –

+0

您的預期結果是什麼? – Felix

回答

0

這將做什麼你問:

$('.amazon').replaceWith($('<div />')); 
0

您可以在DIV HTML空

$(".amazon").html("");