画图园的js中有个function,要text进去参数,然后显示出来。
代码大概是这样的
function drawValue() {
ctx.save();
ctx.translate(110, 165);
ctx.textAlign = 'center';
ctx.font = '16px MicrosoftYaHei';
ctx.fillStyle = '#5bb4ff';
ctx.fillText(incurValue, 0, 0);
ctx.fillStyle = '#29dcfc';
ctx.fillText(outcurValue, 0, 0);
ctx.restore()
}
就那两个text要轮流显示出来。 请问各位大神怎么弄?
我试了settimeout和setInterval,不知道是不是我写错了,总是跑不进这连个set方法中。。。。