S
S
strangerfrompast2022-02-23 14:28:48
AJAX
strangerfrompast, 2022-02-23 14:28:48

How to add onclick event to order_ajax?

There is code in js file

BX.create('A', {
  props: {
    href: 'javascript:void(0)',
    className: 'btn btn-primary btn-lg btn-order-save'
  },
  html: this.params.MESS_ORDER,
  events: {
    click: BX.proxy(this.clickOrderSaveAction, this)
  }
})


Which in the front displays a button
<a href="javascript:void(0)" class="btn btn-primary btn-lg btn-order-save">Оформить заказ</a>


How can I add code to the design so that the onclick event is displayed in the button:

<a href="javascript:void(0)" class="btn btn-primary btn-lg btn-order-save" onclick="событие(параметры); return true;">Оформить заказ</a>

Answer the question

In order to leave comments, you need to log in

1 answer(s)
E
Edward, 2022-02-24
@strangerfrompast

BX.bind

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question