D
D
DixFrey2016-01-09 20:12:03
JavaScript
DixFrey, 2016-01-09 20:12:03

How to make text show in canvas when submit is clicked in JS?

I have a form, using jQuery I take data from the field
var stHeader = $('#stHeader').val();
And there is a function that displays this text in the canvas when clicked on submit in which onclick="stGenerate()"
Here is the function

function stGenerate() {
      Header.font = '12px Arial';
      Header.fillStyle = '#cfcdcb';
      Header.fillText(stHeader, 88, 27);
  }

But when you click on the button, the text appears and immediately disappears, how to fix it? Thanks in advance

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question