On AJAX I want to display the Buy Now button. For that, I created one variable
var buy_now_button = '<span title="<?php echo __('Buy Now') ?>" id="buy-now" class="action buynow primary" data-mage-init='{ "Test_Detail/js/buy-now": { "form": "#product_addtocart_form" }}'><span><?php echo __('Buy Now') ?></span></span>';
Because of data-mage-init, the function is not working.