1.写了定时器离开页面要关闭定时器
var pl=setTimeout(function () {
}, 10000);
clearTimeout(pl);
2.文本输入框的必去特殊字符
var b ='';
if(that.ruleForm.title!=''){
for (let i =0; i < that.ruleForm.title.length; i++) {
b += that.ruleForm.title[i].replace(/\s/g, '')
}
}
that.ruleForm.title = b;
that.ruleForm.title =encodeURIComponent(that.ruleForm.title);
网友评论