user3904906
user3904906

Reputation: 23

How to call a specific javascript function into html?

as mentioned in the title I need a specific javascript function to be called in html, the function changes constantly upon pressing start and it looks the following:

<dt style="width: 120px">Start 1:</dt> <dd style="margin-left: 150px">{{ start.number1 }}</dd>

{{ start.number1 }} is the function I need to be displayed in html, could you help me with that please? Thanks in advance.

Upvotes: 1

Views: 62

Answers (1)

Daniel Kopitchinski
Daniel Kopitchinski

Reputation: 525

Using curly brackets to bind a Javascript variable into your HTML view is something very typical of javascript frameworks that provide Data Binding such as AngularJS or EmberJS This might be what you're looking for.

There are of course other ways of doing this, such as the new Object.observe() function that's available in Chrome, but it will take a while until its widely supported.

Upvotes: 3

Related Questions