为了账号安全,请及时绑定邮箱和手机立即绑定

如何将获取的时间放入canvas中?

$(".last").click(function () {
   var id_time=new Date();
   var hour=parseInt(document.getElementById("id_hour").value);
   id_time.setHours(hour);
   var minutes=parseInt(document.getElementById("id_minutes").value);
   id_time.setMinutes(minutes);
   var seconds=parseInt(document.getElementById("id_seconds").value);
   id_time.setSeconds(seconds);
   document.write(id_time);
   times=id_time;
   getTimecha(date,times);
   $(".alert").css({display:"none"});

})

正在回答

1 回答

一种是设置全局变量,canvas就可用了,或者以 fn(time,canvas_content)方式,以参数形式同时传入时间和canvas的上下文

0 回复 有任何疑惑可以回复我~

举报

0/150
提交
取消

如何将获取的时间放入canvas中?

我要回答 关注问题
微信客服

购课补贴
联系客服咨询优惠详情

帮助反馈 APP下载

慕课网APP
您的移动学习伙伴

公众号

扫描二维码
关注慕课网微信公众号