2014-03-14 52 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("");