当前位置:网站首页>Canvas judgment content is empty
Canvas judgment content is empty
2022-07-25 13:29:00 【Psychosis】
// verification canvas Whether the canvas is an empty function
function isCanvasBlank(canvas) {
var blank = document.createElement('canvas');// The system gets an empty canvas object
blank.width = canvas.width;
blank.height = canvas.height;
return canvas.toDataURL() == blank.toDataURL();// If the comparison value is equal, it is null
}
// call
/ Form non empty verification
function checkEmpty() {
var c=document.getElementById("canvas"); // obtain html Of canvas object , This is me. id="canvas"
if(isCanvasBlank(c)){
alert(" Please draw a sketch and upload it !");
return;
}
});边栏推荐
- 外围系统调用SAP的WebAPI接口
- 0720RHCSA
- Canvas判断内容为空
- Online Learning and Pricing with Reusable Resources: Linear Bandits with Sub-Exponential Rewards: Li
- 6W+字记录实验全过程 | 探索Alluxio经济化数据存储策略
- The simplest solution of the whole network 1045 access denied for user [email protected] (using password:YES)
- 0717RHCSA
- 从输入网址到网页显示
- R language GLM generalized linear model: logistic regression, Poisson regression fitting mouse clinical trial data (dose and response) examples and self-test questions
- 一味地做大元宇宙的规模,已经背离了元宇宙本该有的发展逻辑
猜你喜欢

Machine learning strong foundation program 0-4: popular understanding of Occam razor and no free lunch theorem

0713RHCSA

深度学习的训练、预测过程详解【以LeNet模型和CIFAR10数据集为例】
![[review SSM framework series] 15 - Summary of SSM series blog posts [SSM kill]](/img/fb/6ca8e0eb57c76c515e2aae68e9e549.png)
[review SSM framework series] 15 - Summary of SSM series blog posts [SSM kill]
HTTP cache tongtianpian, there may be something you want
详解浮点数的精度问题

IM系统-消息流化一些常见问题
![[Video] visual interpretation of Markov chain principle and Mrs example of R language region conversion | data sharing](/img/6e/9e0abf8db5ec93080033bd89605ac2.jpg)
[Video] visual interpretation of Markov chain principle and Mrs example of R language region conversion | data sharing

0716RHCSA

Mlx90640 infrared thermal imager temperature sensor module development notes (V)
随机推荐
Numpy简介和特点(一)
Connotation and application of industrial Internet
【GCN-RS】Learning Explicit User Interest Boundary for Recommendation (WWW‘22)
Machine learning strong foundation program 0-4: popular understanding of Occam razor and no free lunch theorem
0719RHCSA
牛客论坛项目部署总结
How to solve the problem of taking up too much space when recording and editing videos?
Docekr learning - MySQL 8 master-slave replication setup deployment
Shell common script: get the IP address of the network card
0710RHCSA
HTTP cache tongtianpian, there may be something you want
全网最简单解决方式1045-Access denied for user [email protected](using password:YES)
安装mujoco报错:distutils.errors.DistutilsExecError: command ‘gcc‘ failed with exit status 1
[Video] visual interpretation of Markov chain principle and Mrs example of R language region conversion | data sharing
Convolutional neural network model -- alexnet network structure and code implementation
外围系统调用SAP的WebAPI接口
[ai4code final chapter] alphacode: competition level code generation with alphacode (deepmind)
好友让我看这段代码
Simple understanding of flow
若依如何实现用户免密登录配置方法?